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/zookeeper/topics/version-2 ]; then
64 git clone -b {{ .Values.config.gerritBranch }} --single-branch {{ .Values.config.gerritProject }} /tmp/zookeeper/gerrit;
65 echo "Clone complete. Copying from /tmp/zookeeper/gerrit/oom-projects/data-zookeeper/* to /tmp/zookeeper/topics";
66 cp -var /tmp/zookeeper/gerrit/oom-topics/data-zookeeper/* /tmp/zookeeper/topics;
67 chown -R 1000:1000 /tmp/zookeeper/topics;
70 image: "{{ .Values.global.ubuntuInitRepository }}/{{ .Values.ubuntuInitImage }}"
71 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
73 - mountPath: /tmp/zookeeper/topics
76 - name: {{ include "common.name" . }}
77 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
78 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
80 {{ include "common.resources" . | indent 12 }}
82 - containerPort: {{ .Values.service.clientPort }}
83 name: {{ .Values.service.clientPortName }}
84 - containerPort: {{ .Values.service.serverPort }}
85 name: {{ .Values.service.serverPortName }}
86 - containerPort: {{ .Values.service.leaderElectionPort }}
87 name: {{ .Values.service.leaderElectionPortName }}
88 {{ if eq .Values.liveness.enabled true }}
94 - "zookeeper-ready.sh 2181"
95 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
96 periodSeconds: {{ .Values.liveness.periodSeconds }}
103 - "zookeeper-ready.sh 2181"
104 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
105 periodSeconds: {{ .Values.readiness.periodSeconds }}
108 value: "{{ .Values.replicaCount }}"
109 - name: ZK_INIT_LIMIT
110 value: "{{ .Values.zk.initLimit }}"
111 - name: ZK_SYNC_LIMIT
112 value: "{{ .Values.zk.syncLimit }}"
114 - mountPath: /etc/localtime
117 - mountPath: /var/lib/zookeeper/data
119 {{- if .Values.tolerations }}
121 {{ toYaml .Values.tolerations | indent 10 }}
127 {{ if not .Values.persistence.enabled }}
128 - name: zookeeper-data
131 volumeClaimTemplates:
135 app: {{ include "common.fullname" . }}
136 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
137 release: "{{ .Release.Name }}"
138 heritage: "{{ .Release.Service }}"
141 - {{ .Values.persistence.accessMode | quote }}
144 storage: {{ .Values.persistence.size | quote }}
147 release: "{{ .Release.Name }}"
148 app: {{ .Values.service.name }}
149 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
150 heritage: "{{ .Release.Service }}"
153 - name: "{{ include "common.namespace" . }}-docker-registry-key"