update kafka

main
ycz008 2023-07-12 12:51:30 +08:00
parent 2cc6164bbf
commit 9b1f9f962a
3 changed files with 78 additions and 44 deletions

View File

@ -1,33 +1,5 @@
---
apiVersion: platform.confluent.io/v1beta1
kind: Zookeeper
metadata:
name: zookeeper
spec:
replicas: 3
configOverrides:
jvm:
- "-Xmx128m"
podTemplate:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- zookeeper
topologyKey: kubernetes.io/hostname
image:
application: confluentinc/cp-zookeeper:7.4.0
init: confluentinc/confluent-init-container:2.6.0
dataVolumeCapacity: 10Gi
logVolumeCapacity: 10Gi
storageClass:
name: local-kafka
---
apiVersion: platform.confluent.io/v1beta1
kind: Kafka
metadata:
name: kafka
@ -48,15 +20,23 @@ spec:
memory: "4G"
cpu: "1"
affinity:
podAntiAffinity:
# podAntiAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# - labelSelector:
# matchExpressions:
# - key: app
# operator: In
# values:
# - kafka
# topologyKey: kubernetes.io/hostname
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- kafka
topologyKey: kubernetes.io/hostname
nodeSelectorTerms:
- matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- trainer
image:
application: confluentinc/cp-server:7.4.0
init: confluentinc/confluent-init-container:2.6.0
@ -80,15 +60,23 @@ spec:
- "-Xmx128m"
podTemplate:
affinity:
podAntiAffinity:
# podAntiAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# - labelSelector:
# matchExpressions:
# - key: app
# operator: In
# values:
# - schemaregistry
# topologyKey: kubernetes.io/hostname
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- schemaregistry
topologyKey: kubernetes.io/hostname
nodeSelectorTerms:
- matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- trainer
image:
application: confluentinc/cp-schema-registry:7.4.0
init: confluentinc/confluent-init-container:2.6.0

View File

@ -1,3 +1,13 @@
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: local-zookeeper
provisioner: openebs.io/local
reclaimPolicy: Retain
allowVolumeExpansion: true
volumeBindingMode: WaitForFirstConsumer
---
apiVersion: storage.k8s.io/v1
kind: StorageClass

View File

@ -0,0 +1,36 @@
---
apiVersion: platform.confluent.io/v1beta1
kind: Zookeeper
metadata:
name: zookeeper
spec:
replicas: 3
configOverrides:
jvm:
- "-Xmx128m"
podTemplate:
affinity:
# podAntiAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# - labelSelector:
# matchExpressions:
# - key: app
# operator: In
# values:
# - zookeeper
# topologyKey: kubernetes.io/hostname
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- trainer
image:
application: confluentinc/cp-zookeeper:7.4.0
init: confluentinc/confluent-init-container:2.6.0
dataVolumeCapacity: 10Gi
logVolumeCapacity: 10Gi
storageClass:
name: local-zookeeper