2 # Copyright © 2022 Nordix Foundation
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
16 apiVersion: kafka.strimzi.io/v1beta2
18 metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
21 version: {{ .Values.config.kafkaVersion }}
22 replicas: {{ .Values.replicaCount }}
25 port: {{ .Values.config.kafkaInternalPort }}
29 type: {{ .Values.config.saslMechanism }}
38 type: {{ if (include "common.ingressEnabled" .) }}cluster-ip{{ else }}nodeport{{ end }}
39 tls: {{ if (include "common.ingressEnabled" .) }}false{{ else }}true{{ end }}
41 type: {{ if (include "common.ingressEnabled" .) }}{{ .Values.config.saslMechanism }}{{ else }}tls{{ end }}
43 {{- if not (include "common.ingressEnabled" .) }}
45 nodePort: {{ .Values.global.nodePortPrefixExt }}93
49 advertisedHost: {{ .Values.config.advertisedHost }}
50 advertisedPort: {{ .Values.config.advertizedPortBroker0 }}
51 {{- if not (include "common.ingressEnabled" .) }}
52 nodePort: {{ .Values.global.nodePortPrefixExt }}90
55 advertisedHost: {{ .Values.config.advertisedHost }}
56 advertisedPort: {{ .Values.config.advertizedPortBroker1 }}
57 {{- if not (include "common.ingressEnabled" .) }}
58 nodePort: {{ .Values.global.nodePortPrefixExt }}91
61 advertisedHost: {{ .Values.config.advertisedHost }}
62 advertisedPort: {{ .Values.config.advertizedPortBroker2 }}
63 {{- if not (include "common.ingressEnabled" .) }}
64 nodePort: {{ .Values.global.nodePortPrefixExt }}92
67 type: {{ .Values.config.authType }}
69 - {{ .Values.config.strimziKafkaAdminUser }}
75 {{- if .Values.affinity.podAntiAffinity.enabled }}
78 requiredDuringSchedulingIgnoredDuringExecution:
81 - key: strimzi.io/name
84 - {{ include "common.fullname" . }}-kafka
85 topologyKey: "kubernetes.io/hostname"
88 default.replication.factor: {{ .Values.replicaCount }}
89 min.insync.replicas: {{ (eq 1.0 (.Values.replicaCount)) | ternary 1 (sub .Values.replicaCount 1) }}
90 offsets.topic.replication.factor: {{ .Values.replicaCount }}
91 num.partitions: {{ mul .Values.replicaCount 2 }}
92 transaction.state.log.replication.factor: {{ .Values.replicaCount }}
93 transaction.state.log.min.isr: {{ (eq 1.0 (.Values.replicaCount)) | ternary 1 (sub .Values.replicaCount 1) }}
94 log.message.format.version: {{ .Values.config.kafkaVersion }}
95 inter.broker.protocol.version: {{ .Values.config.kafkaVersion }}
96 auto.create.topics.enable: {{ .Values.config.autoCreateTopics }}
101 type: persistent-claim
102 size: {{ .Values.persistence.kafka.size }}
104 class: {{ include "common.storageClass" (dict "dot" . "suffix" "kafka" "persistenceInfos" .Values.persistence.kafka) }}
105 {{- if .Values.metrics.kafkaExporter.enabled }}
107 type: {{ .Values.metrics.kafkaExporter.metricsConfig.type }}
110 name: {{ include "common.fullname" . }}
111 key: kafka-metrics-config.yml
119 {{- if .Values.affinity.podAntiAffinity.enabled }}
122 requiredDuringSchedulingIgnoredDuringExecution:
125 - key: strimzi.io/name
128 - {{ include "common.fullname" . }}-zookeeper
129 topologyKey: "kubernetes.io/hostname"
131 replicas: {{ .Values.replicaCount }}
133 ssl.hostnameVerification: false
134 ssl.quorum.hostnameVerification: false
135 {{- if (include "common.onServiceMesh" .) }}
139 type: persistent-claim
140 size: {{ .Values.persistence.zookeeper.size }}
142 class: {{ include "common.storageClass" (dict "dot" . "suffix" "zk" "persistenceInfos" .Values.persistence.zookeeper) }}
143 {{- if .Values.metrics.kafkaExporter.enabled }}
145 type: {{ .Values.metrics.kafkaExporter.metricsConfig.type }}
148 name: {{ include "common.fullname" . }}
149 key: zookeeper-metrics-config.yml
154 {{- if .Values.cruiseControl.enabled }}
157 type: {{ .Values.cruiseControl.metricsConfig.type }}
160 name: {{ include "common.fullname" . }}
161 key: cruisecontrol-metrics-config.yml
163 {{- if .Values.metrics.kafkaExporter.enabled }}
165 topicRegex: {{ .Values.metrics.kafkaExporter.topicRegex }}
166 groupRegex: {{ .Values.metrics.kafkaExporter.groupRegex }}
169 cpu: {{ .Values.metrics.kafkaExporter.resources.requests.cpu }}
170 memory: {{ .Values.metrics.kafkaExporter.resources.requests.memory }}
172 cpu: {{ .Values.metrics.kafkaExporter.resources.limits.cpu }}
173 memory: {{ .Values.metrics.kafkaExporter.resources.limits.memory }}
174 logging: {{ .Values.metrics.kafkaExporter.logging }}
175 enableSaramaLogging: {{ .Values.metrics.kafkaExporter.enableSaramaLogging }}
177 initialDelaySeconds: {{ .Values.metrics.kafkaExporter.readinessProbe.initialDelaySeconds }}
178 timeoutSeconds: {{ .Values.metrics.kafkaExporter.readinessProbe.timeoutSeconds }}
180 initialDelaySeconds: {{ .Values.metrics.kafkaExporter.livenessProbe.initialDelaySeconds }}
181 timeoutSeconds: {{ .Values.metrics.kafkaExporter.livenessProbe.timeoutSeconds }}