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 }}
32 maxUnavailable: {{ .Values.maxUnavailable }}
33 podManagementPolicy: Parallel
37 app: {{ include "common.name" . }}
38 release: {{ .Release.Name }}
41 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" . }}-seed-topics-apikeys
61 if [ -d /tmp/topics/version-2 ]; then
64 git clone -b {{ .Values.config.gerritBranch }} --single-branch {{ .Values.config.gerritProject }} /tmp/gerrit;
65 echo "Clone complete. Copying from /tmp/gerrit/oom-projects/data-zookeeper/* to /tmp/topics";
66 cp -var /tmp/gerrit/oom-topics/data-zookeeper/* /tmp/topics;
69 image: "{{ .Values.global.ubuntuInitRepository }}/{{ .Values.ubuntuInitImage }}"
70 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
72 - mountPath: /tmp/topics
75 - name: {{ include "common.name" . }}
76 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
77 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
79 {{ include "common.resources" . | indent 12 }}
81 - containerPort: {{ .Values.service.clientPort }}
82 name: {{ .Values.service.clientPortName }}
83 - containerPort: {{ .Values.service.serverPort }}
84 name: {{ .Values.service.serverPortName }}
85 - containerPort: {{ .Values.service.leaderElectionPort }}
86 name: {{ .Values.service.leaderElectionPortName }}
87 {{ if eq .Values.liveness.enabled true }}
93 - "zookeeper-ready.sh 2181"
94 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
95 periodSeconds: {{ .Values.liveness.periodSeconds }}
102 - "zookeeper-ready.sh 2181"
103 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
104 periodSeconds: {{ .Values.readiness.periodSeconds }}
107 value: "{{ .Values.replicaCount }}"
108 - name: ZK_INIT_LIMIT
109 value: "{{ .Values.zk.initLimit }}"
110 - name: ZK_SYNC_LIMIT
111 value: "{{ .Values.zk.syncLimit }}"
113 - mountPath: /etc/localtime
116 - mountPath: /var/lib/zookeeper/data
118 {{- if .Values.tolerations }}
120 {{ toYaml .Values.tolerations | indent 10 }}
126 {{ if not .Values.persistence.enabled }}
127 - name: zookeeper-data
130 volumeClaimTemplates:
134 app: {{ include "common.fullname" . }}
135 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
136 release: "{{ .Release.Name }}"
137 heritage: "{{ .Release.Service }}"
140 - {{ .Values.persistence.accessMode | quote }}
143 storage: {{ .Values.persistence.size | quote }}
146 release: "{{ .Release.Name }}"
147 app: {{ .Values.service.name }}
148 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
149 heritage: "{{ .Release.Service }}"
152 - name: "{{ include "common.namespace" . }}-docker-registry-key"