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 ################################################################################
19 apiVersion: apps/v1beta1
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 }}
32 podManagementPolicy: Parallel
36 app: {{ include "common.name" . }}
37 release: {{ .Release.Name }}
40 {{if eq .Values.podAntiAffinityType "hard" -}}
41 requiredDuringSchedulingIgnoredDuringExecution:
43 preferredDuringSchedulingIgnoredDuringExecution:
52 - {{ include "common.name" . }}
53 topologyKey: "kubernetes.io/hostname"
54 {{- if .Values.nodeAffinity }}
56 {{ toYaml .Values.nodeAffinity | indent 10 }}
59 - name: {{ include "common.name" . }}-initcontainer
60 image: "{{ .Values.global.ubuntuInitRepository }}/{{ .Values.ubuntuInitImage }}"
61 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
66 chown -R 1000:1000 /opt/kafka/data;
67 image: "{{ .Values.busyBoxRepository }}/{{ .Values.busyBoxImage }}"
68 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
70 - mountPath: /opt/kafka/data
72 name: {{ include "common.name" . }}-permission-fixer
74 - name: {{ include "common.name" . }}
75 image: "{{ .Values.onapRepository }}/{{ .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
127 value: "/opt/kafka/data"
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
140 - mountPath: /opt/kafka/data
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"