From 64cc301824182c242471d2e9e07ec8a129142a97 Mon Sep 17 00:00:00 2001 From: Vladislav Klimenko Date: Mon, 4 Apr 2022 11:07:34 +0300 Subject: [PATCH] env: k8s basic deploy --- deploy/k8s/debezium.yaml | 39 +++++++++++++++++++++++++++++++++++++++ deploy/k8s/mysql.yaml | 20 ++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 deploy/k8s/debezium.yaml create mode 100644 deploy/k8s/mysql.yaml diff --git a/deploy/k8s/debezium.yaml b/deploy/k8s/debezium.yaml new file mode 100644 index 0000000..312e95e --- /dev/null +++ b/deploy/k8s/debezium.yaml @@ -0,0 +1,39 @@ +apiVersion: v1 +kind: Pod +metadata: + name: debezium-connect + namespace: mysql +spec: + containers: + - name: connect + image: debezium/connect + ports: + - name: debezium + containerPort: 8083 + protocol: TCP + env: + - name: BOOTSTRAP_SERVERS + value: "one-node-cluster-0.one-node-cluster.redpanda.svc.cluster.local:9092" + - name: GROUP_ID + value: "1" + - name: CONFIG_STORAGE_TOPIC + value: "inventory.configs" + - name: OFFSET_STORAGE_TOPIC + value: "inventory.offset" + - name: STATUS_STORAGE_TOPIC + value: "inventory.status" +--- +apiVersion: v1 +kind: Service +metadata: + name: debezium-connect + namespace: mysql +spec: + ports: + - name: debezium + port: 8083 + targetPort: 8083 + selector: + app.kubernetes.io/name: debezium-connect + clusterIP: None + type: ClusterIP diff --git a/deploy/k8s/mysql.yaml b/deploy/k8s/mysql.yaml new file mode 100644 index 0000000..834508e --- /dev/null +++ b/deploy/k8s/mysql.yaml @@ -0,0 +1,20 @@ +apiVersion: v1 +kind: Secret +metadata: + name: mypwds + namespace: mysql +type: Opaque +data: + rootHost: JQ== + rootPassword: YWx0aW5pdHk= + rootUser: cm9vdA== +--- +apiVersion: mysql.oracle.com/v2alpha1 +kind: InnoDBCluster +metadata: + name: mycluster +spec: + secretName: mypwds + instances: 1 + router: + instances: 1