1 # Copyright © 2017 Amdocs, Bell Canada
2 # Modifications Copyright © 2018 AT&T
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: apps/v1beta1
19 name: {{ include "common.fullname" . }}
20 namespace: {{ include "common.namespace" . }}
22 app: {{ include "common.name" . }}
23 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
24 release: {{ .Release.Name }}
25 heritage: {{ .Release.Service }}
27 serviceName: {{ .Values.service.name }}
28 replicas: {{ .Values.replicaCount }}
29 podManagementPolicy: Parallel
33 app: {{ include "common.name" . }}
34 release: {{ .Release.Name }}
37 {{if eq .Values.podAntiAffinityType "hard" -}}
38 requiredDuringSchedulingIgnoredDuringExecution:
40 preferredDuringSchedulingIgnoredDuringExecution:
49 - {{ include "common.name" . }}
50 topologyKey: "kubernetes.io/hostname"
51 {{- if .Values.nodeAffinity }}
53 {{ toYaml .Values.nodeAffinity | indent 10 }}
56 - name: {{ include "common.name" . }}-initcontainer
57 image: "{{ .Values.global.ubuntuInitRepository }}/{{ .Values.ubuntuInitImage }}"
58 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
63 - {{ .Values.zookeeper.name }}
69 fieldPath: metadata.namespace
70 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
71 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
72 name: {{ include "common.name" . }}-readiness
77 chown -R 1000:1000 /opt/kafka/data;
78 cp /opt/kafka/tmpconfig/server.properties /opt/kafka/config/;
79 chown 1000:1000 /opt/kafka/config/server.properties;
82 image: "{{ .Values.busyBoxRepository }}/{{ .Values.busyBoxImage }}"
83 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
85 - mountPath: /opt/kafka/data
87 - mountPath: /opt/kafka/tmpconfig/server.properties
88 subPath: server.properties
90 - mountPath: /opt/kafka/config
92 name: {{ include "common.name" . }}-permission-fixer
94 - name: {{ include "common.name" . }}
95 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
96 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
101 export KAFKA_BROKER_ID=${HOSTNAME##*-} && \
102 export ENDPOINT_PORT=$(( $KAFKA_BROKER_ID + {{ .Values.service.baseNodePort }} )) && \
103 export KAFKA_ADVERTISED_LISTENERS=EXTERNAL_SASL_PLAINTEXT://$(HOST_IP):$(( $KAFKA_BROKER_ID + {{ .Values.service.baseNodePort }} )),INTERNAL_SASL_PLAINTEXT://:{{ .Values.service.internalPort }} && \
106 {{ include "common.resources" . | indent 12 }}
108 - containerPort: {{ .Values.service.internalPort }}
109 - containerPort: {{ .Values.service.externalPort }}
110 {{ if eq .Values.liveness.enabled true }}
113 port: {{ .Values.service.internalPort }}
114 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
115 periodSeconds: {{ .Values.liveness.periodSeconds }}
116 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
120 port: {{ .Values.service.internalPort }}
121 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
122 periodSeconds: {{ .Values.readiness.periodSeconds }}
123 timeoutSeconds: {{ .Values.readiness.timeoutSeconds }}
129 fieldPath: status.hostIP
130 - name: aaf_locate_url
131 value: https://aaf-locate.{{ include "common.namespace" . }}:8095
134 - mountPath: /etc/localtime
137 - mountPath: /var/run/docker.sock
139 - mountPath: /opt/kafka/tmpconfig/server.properties
140 subPath: server.properties
142 - mountPath: /opt/kafka/config/server.properties
143 subPath: server.properties
145 - mountPath: /opt/kafka/config/log4j.properties
146 subPath: log4j.properties
148 - mountPath: /opt/kafka/config/cadi.properties
149 subPath: cadi.properties
151 - mountPath: /opt/kafka/data
153 {{- if .Values.tolerations }}
155 {{ toYaml .Values.tolerations | indent 10 }}
163 - name: docker-socket
165 path: /var/run/docker.sock
168 name: {{ include "common.fullname" . }}-server-prop-configmap
171 name: {{ include "common.fullname" . }}-log4j-prop-configmap
174 name: {{ include "common.fullname" . }}-cadi-prop-configmap
175 {{ if not .Values.persistence.enabled }}
179 volumeClaimTemplates:
183 app: {{ include "common.fullname" . }}
184 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
185 release: "{{ .Release.Name }}"
186 heritage: "{{ .Release.Service }}"
189 - {{ .Values.persistence.accessMode | quote }}
192 storage: {{ .Values.persistence.size | quote }}
195 release: "{{ .Release.Name }}"
196 app: {{ .Values.service.name }}
197 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
198 heritage: "{{ .Release.Service }}"
201 - name: "{{ include "common.namespace" . }}-docker-registry-key"