From 17f557a29b2355c80333c22235f37542ab8e520b Mon Sep 17 00:00:00 2001 From: ycz008 Date: Tue, 25 Jun 2024 19:07:05 +0800 Subject: [PATCH] add: add tcs di kafka --- tcs-upgrade/kafka/kafka-di.yaml | 107 ++++++++++++++++++ .../kafka/{kafka-1.yml => kafka-ldap.yaml} | 0 tcs-upgrade/kafka/storage-di.yaml | 9 ++ 3 files changed, 116 insertions(+) create mode 100644 tcs-upgrade/kafka/kafka-di.yaml rename tcs-upgrade/kafka/{kafka-1.yml => kafka-ldap.yaml} (100%) create mode 100644 tcs-upgrade/kafka/storage-di.yaml diff --git a/tcs-upgrade/kafka/kafka-di.yaml b/tcs-upgrade/kafka/kafka-di.yaml new file mode 100644 index 0000000..7940f6a --- /dev/null +++ b/tcs-upgrade/kafka/kafka-di.yaml @@ -0,0 +1,107 @@ +--- +apiVersion: platform.confluent.io/v1beta1 +kind: Zookeeper +metadata: + name: zookeeper +spec: + replicas: 3 + oneReplicaPerNode: true + configOverrides: + jvm: + - "-Xmx256m" + podTemplate: + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: app.kubernetes.io/name + operator: In + values: + - tcs-di + image: + application: confluentinc/cp-zookeeper:7.4.0 + init: confluentinc/confluent-init-container:2.6.0 + dataVolumeCapacity: 10Gi + logVolumeCapacity: 10Gi + storageClass: + name: tcs-kafka-di +--- +apiVersion: platform.confluent.io/v1beta1 +kind: Kafka +metadata: + name: kafka +spec: + replicas: 3 + oneReplicaPerNode: true + configOverrides: + server: + - auto.create.topics.enable=true + - default.replication.factor=3 + jvm: + - "-Xmx512m" + podTemplate: + resources: + requests: + memory: "256Mi" + cpu: "100m" + limits: + memory: "4G" + cpu: "1" + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: app.kubernetes.io/name + operator: In + values: + - tcs-di + image: + application: confluentinc/cp-server:7.4.0 + init: confluentinc/confluent-init-container:2.6.0 + dataVolumeCapacity: 20Gi + storageClass: + name: tcs-kafka-di + metricReporter: + enabled: true + listeners: + external: + externalAccess: + type: nodePort + nodePort: + host: kafka-tcs.drillinsight.com + nodePortOffset: 31001 + # dependencies: + # 多个kakfa集群复用zk + # zookeeper: + # endpoint: zookeeper.common.svc.cluster.local:2181 +--- +apiVersion: platform.confluent.io/v1beta1 +kind: SchemaRegistry +metadata: + name: schemaregistry +spec: + replicas: 3 + oneReplicaPerNode: true + configOverrides: + jvm: + - "-Xmx128m" + podTemplate: + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: app.kubernetes.io/name + operator: In + values: + - tcs-di + image: + application: confluentinc/cp-schema-registry:7.4.0 + init: confluentinc/confluent-init-container:2.6.0 + externalAccess: + type: nodePort + nodePort: + host: kafka-tcs.drillinsight.com + nodePortOffset: 31005 diff --git a/tcs-upgrade/kafka/kafka-1.yml b/tcs-upgrade/kafka/kafka-ldap.yaml similarity index 100% rename from tcs-upgrade/kafka/kafka-1.yml rename to tcs-upgrade/kafka/kafka-ldap.yaml diff --git a/tcs-upgrade/kafka/storage-di.yaml b/tcs-upgrade/kafka/storage-di.yaml new file mode 100644 index 0000000..1f478c5 --- /dev/null +++ b/tcs-upgrade/kafka/storage-di.yaml @@ -0,0 +1,9 @@ +--- +apiVersion: storage.k8s.io/v1 +kind: StorageClass +metadata: + name: tcs-kafka-di +provisioner: openebs.io/local +reclaimPolicy: Retain +allowVolumeExpansion: true +volumeBindingMode: WaitForFirstConsumer \ No newline at end of file