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
74 - name: {{ include "common.name" . }}
75 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
76 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
81 export KAFKA_BROKER_ID=${HOSTNAME##*-} && \
82 export ENDPOINT_PORT=$(( $KAFKA_BROKER_ID + {{ .Values.service.baseNodePort }} )) && \
83 export KAFKA_ADVERTISED_LISTENERS=EXTERNAL_SASL_PLAINTEXT://$(HOST_IP):$(( $KAFKA_BROKER_ID + {{ .Values.service.baseNodePort }} )),INTERNAL_SASL_PLAINTEXT://:{{ .Values.service.internalPort }} && \
86 {{ include "common.resources" . | indent 12 }}
88 - containerPort: {{ .Values.service.internalPort }}
89 - containerPort: {{ .Values.service.externalPort }}
90 {{ if eq .Values.liveness.enabled true }}
93 port: {{ .Values.service.internalPort }}
94 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
95 periodSeconds: {{ .Values.liveness.periodSeconds }}
99 port: {{ .Values.service.internalPort }}
100 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
101 periodSeconds: {{ .Values.readiness.periodSeconds }}
107 fieldPath: status.hostIP
108 - name: KAFKA_ZOOKEEPER_CONNECT
109 value: "{{.Values.zookeeper.name}}:{{.Values.zookeeper.port}}"
110 - name: KAFKA_LISTENER_SECURITY_PROTOCOL_MAP
111 value: "INTERNAL_SASL_PLAINTEXT:SASL_PLAINTEXT,EXTERNAL_SASL_PLAINTEXT:SASL_PLAINTEXT"
112 - name: KAFKA_LISTENERS
113 value: "EXTERNAL_SASL_PLAINTEXT://0.0.0.0:{{ .Values.service.externalPort }},INTERNAL_SASL_PLAINTEXT://0.0.0.0:{{ .Values.service.internalPort }}"
114 - name: KAFKA_INTER_BROKER_LISTENER_NAME
115 value: "INTERNAL_SASL_PLAINTEXT"
116 - name: KAFKA_SASL_ENABLED_MECHANISMS
118 - name: KAFKA_SASL_MECHANISM_INTER_BROKER_PROTOCOL
120 - name: KAFKA_AUTHORIZER_CLASS_NAME
121 value: "{{ .Values.kafkaCustomAuthorizer }}"
122 - name: KAFKA_DELETE_TOPIC_ENABLE
123 value: "{{ .Values.deleteTopicEnable }}"
124 - name: aaf_locate_url
125 value: "https://aaf-locate:8095"
126 - name: KAFKA_LOG_DIRS
128 - name: KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR
129 value: "{{ .Values.replicaCount }}"
130 - name: KAFKA_DEFAULT_REPLICATION_FACTOR
131 value: "{{ .Values.replicaCount }}"
132 - name: KAFKA_NUM_PARTITIONS
133 value: "{{ .Values.defaultpartitions }}"
135 - mountPath: /etc/localtime
138 - mountPath: /var/run/docker.sock
142 {{- if .Values.tolerations }}
144 {{ toYaml .Values.tolerations | indent 10 }}
150 - name: docker-socket
152 path: /var/run/docker.sock
153 {{ if not .Values.persistence.enabled }}
157 volumeClaimTemplates:
161 app: {{ include "common.fullname" . }}
162 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
163 release: "{{ .Release.Name }}"
164 heritage: "{{ .Release.Service }}"
167 - {{ .Values.persistence.accessMode | quote }}
170 storage: {{ .Values.persistence.size | quote }}
173 release: "{{ .Release.Name }}"
174 app: {{ .Values.service.name }}
175 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
176 heritage: "{{ .Release.Service }}"
179 - name: "{{ include "common.namespace" . }}-docker-registry-key"