1 ################################################################################
2 # Copyright (c) 2019 AT&T Intellectual Property. #
3 # Copyright (c) 2019 Nokia. #
5 # Licensed under the Apache License, Version 2.0 (the "License"); #
6 # you may not use this file except in compliance with the License. #
7 # You may obtain a copy of the License at #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
11 # Unless required by applicable law or agreed to in writing, software #
12 # distributed under the License is distributed on an "AS IS" BASIS, #
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
14 # See the License for the specific language governing permissions and #
15 # limitations under the License. #
16 ################################################################################
22 name: {{ include "common.fullname" . }}
23 namespace: {{ include "common.namespace" . }}
25 app: {{ include "common.name" . }}
26 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
27 release: {{ .Release.Name }}
28 heritage: {{ .Release.Service }}
30 serviceName: {{ .Values.service.name }}
31 replicas: {{ .Values.replicaCount }}
34 app: {{ include "common.name" . }}
35 release: {{ .Release.Name }}
36 podManagementPolicy: Parallel
40 app: {{ include "common.name" . }}
41 release: {{ .Release.Name }}
44 {{if eq .Values.podAntiAffinityType "hard" -}}
45 requiredDuringSchedulingIgnoredDuringExecution:
47 preferredDuringSchedulingIgnoredDuringExecution:
56 - {{ include "common.name" . }}
57 topologyKey: "kubernetes.io/hostname"
58 {{- if .Values.nodeAffinity }}
60 {{ toYaml .Values.nodeAffinity | indent 10 }}
63 - name: {{ include "common.name" . }}-initcontainer
64 image: "{{ .Values.global.ubuntuInitRepository }}/{{ .Values.ubuntuInitImage }}"
65 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
70 chown -R 1000:1000 /opt/kafka/data;
71 image: "{{ .Values.busyBoxRepository }}/{{ .Values.busyBoxImage }}"
72 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
74 - mountPath: /opt/kafka/data
76 name: {{ include "common.name" . }}-permission-fixer
78 - name: {{ include "common.name" . }}
79 image: "{{ .Values.onapRepository }}/{{ .Values.image }}"
80 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
85 export KAFKA_BROKER_ID=${HOSTNAME##*-} && \
86 export ENDPOINT_PORT=$(( $KAFKA_BROKER_ID + {{ .Values.service.baseNodePort }} )) && \
87 export KAFKA_ADVERTISED_LISTENERS=EXTERNAL_SASL_PLAINTEXT://$(HOST_IP):$(( $KAFKA_BROKER_ID + {{ .Values.service.baseNodePort }} )),INTERNAL_SASL_PLAINTEXT://:{{ .Values.service.internalPort }} && \
90 {{ include "common.resources" . | indent 12 }}
92 - containerPort: {{ .Values.service.internalPort }}
93 - containerPort: {{ .Values.service.externalPort }}
94 {{ if eq .Values.liveness.enabled true }}
97 port: {{ .Values.service.internalPort }}
98 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
99 periodSeconds: {{ .Values.liveness.periodSeconds }}
103 port: {{ .Values.service.internalPort }}
104 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
105 periodSeconds: {{ .Values.readiness.periodSeconds }}
111 fieldPath: status.hostIP
112 - name: KAFKA_ZOOKEEPER_CONNECT
113 value: "{{.Values.zookeeper.name}}:{{.Values.zookeeper.port}}"
114 - name: KAFKA_LISTENER_SECURITY_PROTOCOL_MAP
115 value: "INTERNAL_SASL_PLAINTEXT:SASL_PLAINTEXT,EXTERNAL_SASL_PLAINTEXT:SASL_PLAINTEXT"
116 - name: KAFKA_LISTENERS
117 value: "EXTERNAL_SASL_PLAINTEXT://0.0.0.0:{{ .Values.service.externalPort }},INTERNAL_SASL_PLAINTEXT://0.0.0.0:{{ .Values.service.internalPort }}"
118 - name: KAFKA_INTER_BROKER_LISTENER_NAME
119 value: "INTERNAL_SASL_PLAINTEXT"
120 - name: KAFKA_SASL_ENABLED_MECHANISMS
122 - name: KAFKA_SASL_MECHANISM_INTER_BROKER_PROTOCOL
124 - name: KAFKA_AUTHORIZER_CLASS_NAME
125 value: "{{ .Values.kafkaCustomAuthorizer }}"
126 - name: KAFKA_DELETE_TOPIC_ENABLE
127 value: "{{ .Values.deleteTopicEnable }}"
128 - name: aaf_locate_url
129 value: "https://aaf-locate:8095"
130 - name: KAFKA_LOG_DIRS
131 value: "/opt/kafka/data"
132 - name: KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR
133 value: "{{ .Values.replicaCount }}"
134 - name: KAFKA_DEFAULT_REPLICATION_FACTOR
135 value: "{{ .Values.replicaCount }}"
136 - name: KAFKA_NUM_PARTITIONS
137 value: "{{ .Values.defaultpartitions }}"
138 - name: KAFKA_ZOOKEEPER_CONNECTION_TIMEOUT_MS
141 - mountPath: /etc/localtime
144 - mountPath: /var/run/docker.sock
146 - mountPath: /opt/kafka/data
148 {{- if .Values.tolerations }}
150 {{ toYaml .Values.tolerations | indent 10 }}
156 - name: docker-socket
158 path: /var/run/docker.sock
159 {{ if not .Values.persistence.enabled }}
163 volumeClaimTemplates:
167 app: {{ include "common.fullname" . }}
168 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
169 release: "{{ .Release.Name }}"
170 heritage: "{{ .Release.Service }}"
173 - {{ .Values.persistence.accessMode | quote }}
176 storage: {{ .Values.persistence.size | quote }}
179 release: "{{ .Release.Name }}"
180 app: {{ .Values.service.name }}
181 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
182 heritage: "{{ .Release.Service }}"
185 - name: "docker-reg-cred"