[DMAAP-STRIMZI] Move strimzi kafka bridge
[oom.git] / kubernetes / strimzi / templates / strimzi-kafka.yaml
1 {{/*
2 # Copyright © 2022 Nordix Foundation
3 #
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
7 #
8 #       http://www.apache.org/licenses/LICENSE-2.0
9 #
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.
15 */}}
16 apiVersion: kafka.strimzi.io/v1beta2
17 kind: Kafka
18 metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
19 spec:
20   kafka:
21     version: {{ .Values.config.kafkaVersion }}
22     replicas: {{ .Values.replicaCount }}
23     listeners:
24       - name: plain
25         port: {{ .Values.config.kafkaInternalPort }}
26         type: internal
27         tls: false
28         authentication:
29           type: {{ .Values.config.saslMechanism }}
30       - name: tls
31         port: 9093
32         type: internal
33         tls: true
34         authentication:
35           type: tls
36       - name: external
37         port: 9094
38         type: nodeport
39         tls: true
40         authentication:
41           type: tls
42         configuration:
43           bootstrap:
44             nodePort: {{ .Values.global.nodePortPrefixExt }}93
45           brokers:
46             - broker: 0
47               nodePort: {{ .Values.global.nodePortPrefixExt }}90
48             - broker: 1
49               nodePort: {{ .Values.global.nodePortPrefixExt }}91
50             - broker: 2
51               nodePort: {{ .Values.global.nodePortPrefixExt }}92
52     authorization:
53       type: {{ .Values.config.authType }}
54       superUsers:
55         - {{ .Values.config.strimziKafkaAdminUser }}
56     template:
57       pod:
58         securityContext:
59           runAsUser: 0
60           fsGroup: 0
61     config:
62       default.replication.factor: {{ .Values.replicaCount }}
63       min.insync.replicas: {{ (eq 1.0 (.Values.replicaCount)) | ternary 1 (sub .Values.replicaCount 1) }}
64       offsets.topic.replication.factor: {{ .Values.replicaCount }}
65       num.partitions: {{ mul .Values.replicaCount 2 }}
66       transaction.state.log.replication.factor: {{ .Values.replicaCount }}
67       transaction.state.log.min.isr: {{ (eq 1.0 (.Values.replicaCount)) | ternary 1 (sub .Values.replicaCount 1) }}
68       log.message.format.version: {{ .Values.config.kafkaVersion }}
69       inter.broker.protocol.version: {{ .Values.config.kafkaVersion }}
70     storage:
71       type: jbod
72       volumes:
73       - id: 0
74         type: persistent-claim
75         size: {{ .Values.persistence.kafka.size }}
76         deleteClaim: true
77         class: {{ include "common.storageClass" (dict "dot" . "suffix" "kafka" "persistenceInfos" .Values.persistence.kafka) }}
78   zookeeper:
79     template:
80       pod:
81         securityContext:
82           runAsUser: 0
83           fsGroup: 0
84     replicas: {{ .Values.replicaCount }}
85     config:
86       ssl.hostnameVerification: false
87       ssl.quorum.hostnameVerification: false
88       {{- if (include "common.onServiceMesh" .) }}
89       sslQuorum: false
90       {{- end }}
91     storage:
92       type: persistent-claim
93       size: {{ .Values.persistence.zookeeper.size }}
94       deleteClaim: true
95       class: {{ include "common.storageClass" (dict "dot" . "suffix" "zk" "persistenceInfos" .Values.persistence.zookeeper) }}
96   entityOperator:
97     topicOperator: {}
98     userOperator: {}
99