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 preferredDuringSchedulingIgnoredDuringExecution:
45 - {{ include "common.name" . }}
46 topologyKey: "kubernetes.io/hostname"
48 - name: {{ include "common.name" . }}-initcontainer
49 image: "{{ .Values.global.ubuntuInitRepository }}/{{ .Values.ubuntuInitImage }}"
50 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
55 - {{ .Values.zookeeper.name }}
61 fieldPath: metadata.namespace
62 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
63 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
64 name: {{ include "common.name" . }}-readiness
66 - name: {{ include "common.name" . }}
67 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
68 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
70 {{ include "common.resources" . | indent 12 }}
72 - containerPort: {{ .Values.service.internalPort }}
73 {{ if eq .Values.liveness.enabled true }}
76 port: {{ .Values.service.internalPort }}
77 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
78 periodSeconds: {{ .Values.liveness.periodSeconds }}
82 port: {{ .Values.service.internalPort }}
83 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
84 periodSeconds: {{ .Values.readiness.periodSeconds }}
90 fieldPath: metadata.name
91 - name: HOST_NAMESPACE
95 fieldPath: metadata.namespace
96 - name: KAFKA_ZOOKEEPER_CONNECT
97 value: "{{.Values.zookeeper.name}}:{{.Values.zookeeper.port}}"
98 - name: KAFKA_LISTENER_SECURITY_PROTOCOL_MAP
99 value: "INTERNAL_PLAINTEXT:PLAINTEXT,EXTERNAL_PLAINTEXT:PLAINTEXT"
100 - name: KAFKA_ADVERTISED_LISTENERS
101 value: "INTERNAL_PLAINTEXT://$(HOST_NAME).{{ .Values.service.name }}.$(HOST_NAMESPACE).svc.cluster.local:{{ .Values.service.internalPort}}"
102 - name: KAFKA_LISTENERS
103 value: "INTERNAL_PLAINTEXT://0.0.0.0:{{.Values.service.internalPort}}"
104 - name: KAFKA_INTER_BROKER_LISTENER_NAME
105 value: "INTERNAL_PLAINTEXT"
106 - name: KAFKA_LOG_DIRS
108 - name: BROKER_ID_COMMAND
109 value: "hostname | awk -F '-' '{print $NF}'"
110 - name: KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR
111 value: "{{ .Values.replicaCount }}"
112 - name: KAFKA_DEFAULT_REPLICATION_FACTOR
113 value: "{{ .Values.replicaCount }}"
114 - name: KAFKA_NUM_PARTITIONS
115 value: "{{ .Values.defaultpartitions }}"
117 - mountPath: /etc/localtime
120 - mountPath: /var/run/docker.sock
124 {{- if .Values.tolerations }}
126 {{ toYaml .Values.tolerations | indent 10 }}
132 - name: docker-socket
134 path: /var/run/docker.sock
135 {{ if not .Values.persistence.enabled }}
139 volumeClaimTemplates:
143 app: {{ include "common.fullname" . }}
144 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
145 release: "{{ .Release.Name }}"
146 heritage: "{{ .Release.Service }}"
149 - {{ .Values.persistence.accessMode | quote }}
152 storage: {{ .Values.persistence.size | quote }}
155 release: "{{ .Release.Name }}"
156 app: {{ .Values.service.name }}
157 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
158 heritage: "{{ .Release.Service }}"
161 - name: "{{ include "common.namespace" . }}-docker-registry-key"