Skip to content

Commit

Permalink
update k8s deployment yaml automatically
Browse files Browse the repository at this point in the history
Signed-off-by: Lei Wang <[email protected]>
  • Loading branch information
doudoubobo committed May 13, 2024
1 parent e2c5cb6 commit 41a56ad
Show file tree
Hide file tree
Showing 7 changed files with 236 additions and 123 deletions.
34 changes: 5 additions & 29 deletions k8s/converter-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,41 +30,17 @@ spec:
--password ${DB_PASSWORD} \
--v6d-sock ${V6D_SOCKET} \
--v6d-size ${V6D_SIZE} \
--etcd-endpoint ${ETCD_ENDPOINT} \
--etcd-endpoint etcd-service:2379 \
--etcd-prefix ${ETCD_PREFIX} \
--kafka-server ${KAFKA_SERVER} \
--kafka-server kafka-service:9092 \
--subgraph-num ${SUBGRAPH_NUM} \
--enable-bulkload ${ENABLE_BULKLOAD} \
--rg-from-etcd 1 \
--k8s-mode yes \
--role converter &&
sleep infinity
env:
- name: KAFKA_SERVER
value: "kafka-service:9092"
- name: DB_HOST
value: "127.0.0.1"
- name: DB_PORT
value: "3306"
- name: DB_USER
value: "dbuser"
- name: DB_PASSWORD
value: "123456"
- name: DB_TYPE
value: "mysql"
- name: DB_NAME
value: "ldbc"
- name: V6D_SOCKET
value: "/tmp/v6d.sock"
- name: V6D_SIZE
value: "750G"
- name: ETCD_ENDPOINT
value: "etcd-service:2379"
- name: ETCD_PREFIX
value: "gart_meta_"
- name: SUBGRAPH_NUM
value: "2"
- name: ENABLE_BULKLOAD
value: "1"
envFrom:
- configMapRef:
name: gart-config


Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ data:
"name": "debezium-connector-mysql",
"config": {
"connector.class": "io.debezium.connector.mysql.MySqlConnector",
"database.hostname": "172.29.161.155",
"database.hostname": "127.0.0.1",
"database.port": "3306",
"database.user": "dbuser",
"database.password": "123456",
Expand All @@ -29,7 +29,7 @@ data:
"transforms.ReplaceField.exclude": "ts_ms,transaction",
"key.converter": "org.apache.kafka.connect.json.JsonConverter",
"value.converter": "org.apache.kafka.connect.json.JsonConverter",
"key.converter.schemas.enabl": "false",
"key.converter.schemas.enable": "false",
"value.converter.schemas.enable": "false",
"database.history.kafka.bootstrap.servers": "kafka-service:9092",
"schema.history.internal.kafka.bootstrap.servers": "kafka-service:9092"
Expand Down
17 changes: 17 additions & 0 deletions k8s/gart-config-template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: gart-config
namespace: gart
data:
DB_HOST: "127.0.0.1"
DB_PORT: "3306"
DB_USER: "dbuser"
DB_PASSWORD: "123456"
DB_TYPE: "mysql"
DB_NAME: "ldbc"
V6D_SOCKET: "/tmp/v6d.sock"
V6D_SIZE: "750G"
ETCD_PREFIX: "gart_meta_"
ENABLE_BULKLOAD: "1"
SUBGRAPH_NUM: "2"
2 changes: 1 addition & 1 deletion k8s/kafka-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: kafka-broker1
namespace: gart
spec:
selector: # This selector must match the template labels
selector:
matchLabels:
app: kafka
template:
Expand Down
34 changes: 5 additions & 29 deletions k8s/writer-deployment.yaml → k8s/writer-deployment-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,42 +31,18 @@ spec:
--password ${DB_PASSWORD} \
--v6d-sock ${V6D_SOCKET} \
--v6d-size ${V6D_SIZE} \
--etcd-endpoint ${ETCD_ENDPOINT} \
--etcd-endpoint etcd-service:2379 \
--etcd-prefix ${ETCD_PREFIX} \
--kafka-server ${KAFKA_SERVER} \
--kafka-server kafka-service:9092 \
--subgraph-num ${SUBGRAPH_NUM} \
--subgraph-id $((${HOSTNAME##*-} + 0)) \
--enable-bulkload ${ENABLE_BULKLOAD} \
--rg-from-etcd 1 \
--k8s-mode yes \
--role writer &&
sleep infinity
env:
- name: KAFKA_SERVER
value: "kafka-service:9092"
- name: DB_HOST
value: "127.0.0.1"
- name: DB_PORT
value: "3306"
- name: DB_USER
value: "dbuser"
- name: DB_PASSWORD
value: "123456"
- name: DB_TYPE
value: "mysql"
- name: DB_NAME
value: "ldbc"
- name: V6D_SOCKET
value: "/tmp/v6d.sock"
- name: V6D_SIZE
value: "750G"
- name: ETCD_ENDPOINT
value: "etcd-service:2379"
- name: ETCD_PREFIX
value: "gart_meta_"
- name: SUBGRAPH_NUM
value: "2"
- name: ENABLE_BULKLOAD
value: "1"
envFrom:
- configMapRef:
name: gart-config


Loading

0 comments on commit 41a56ad

Please sign in to comment.