Merge "Revert "basic auth for so-monitoring""
[oom.git] / kubernetes / dmaap / components / message-router / charts / message-router-zookeeper / templates / statefulset.yaml
index 7cafc14..17b87f8 100644 (file)
@@ -48,24 +48,21 @@ spec:
                     values:
                     - {{ include "common.name" . }}
              topologyKey: "kubernetes.io/hostname"
+      {{- if .Values.nodeAffinity }}
+      nodeAffinity:
+        {{ toYaml .Values.nodeAffinity | indent 10 }}
+      {{- end }}
       initContainers:
-      - name: {{ include "common.name" . }}-seed-topics-apikeys
+      - name: {{ include "common.name" . }}-permission-fixer
         command:
-        - /bin/bash
-        - -c
+        - sh
+        - -exec
         - >
-          if [ -d /tmp/topics/version-2 ]; then
-          echo "nothing to do";
-          else
-          git clone -b {{ .Values.config.gerritBranch }} --single-branch {{ .Values.config.gerritProject }} /tmp/gerrit;
-          echo "Clone complete. Copying from /tmp/gerrit/oom-projects/data-zookeeper/* to /tmp/topics";
-          cp -var /tmp/gerrit/oom-topics/data-zookeeper/* /tmp/topics;
-          echo "Done.";
-          fi
-        image: "{{ .Values.global.ubuntuInitRepository }}/{{ .Values.ubuntuInitImage }}"
+          chown -R 1000:1000 /tmp/zookeeper/apikeys;
+        image: "{{ .Values.busyBoxRepository }}/{{ .Values.busyBoxImage }}"
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         volumeMounts:
-        - mountPath: /tmp/topics
+        - mountPath: /tmp/zookeeper/apikeys
           name: zookeeper-data
       containers:
       - name: {{ include "common.name" . }}
@@ -89,6 +86,7 @@ spec:
             - "zookeeper-ready.sh 2181"
           initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
           periodSeconds: {{ .Values.liveness.periodSeconds }}
+          timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
         {{ end }}
         readinessProbe:
           exec:
@@ -98,6 +96,7 @@ spec:
             - "zookeeper-ready.sh 2181"
           initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
           periodSeconds: {{ .Values.readiness.periodSeconds }}
+          timeoutSeconds: {{ .Values.readiness.timeoutSeconds }}
         env:
         - name: ZK_REPLICAS
           value: "{{ .Values.replicaCount }}"
@@ -134,17 +133,10 @@ spec:
       spec:
         accessModes:
           - {{ .Values.persistence.accessMode | quote }}
+        storageClassName: {{ include "common.storageClass" . }}
         resources:
           requests:
             storage: {{ .Values.persistence.size | quote }}
-        selector:
-          matchLabels:
-            release: "{{ .Release.Name }}"
-            app: {{ .Values.service.name }}
-            chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
-            heritage: "{{ .Release.Service }}"
 {{ end }}
       imagePullSecrets:
       - name: "{{ include "common.namespace" . }}-docker-registry-key"
-
-