Merge "[EXTAPI] Deploy macromode and E2E slicing code changes"
[oom.git] / kubernetes / dmaap / components / message-router / charts / message-router-kafka / templates / statefulset.yaml
index ab3a6bf..fd4a67a 100644 (file)
@@ -12,7 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-apiVersion: apps/v1beta1
+apiVersion: apps/v1
 kind: StatefulSet
 metadata:
   name: {{ include "common.fullname" . }}
@@ -23,6 +23,9 @@ metadata:
     release: {{ include "common.release" . }}
     heritage: {{ .Release.Service }}
 spec:
+  selector:
+    matchLabels:
+      app: {{ include "common.name" . }}
   serviceName: {{ .Values.service.name }}
   replicas: {{ .Values.replicaCount }}
   podManagementPolicy: Parallel
@@ -65,7 +68,7 @@ spec:
         image: "{{ .Values.global.ubuntuInitRepository }}/{{ .Values.ubuntuInitImage }}"
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
       - command:
-        - /root/ready.py
+        - /app/ready.py
         args:
         - --container-name
         - {{ .Values.zookeeper.name }}
@@ -75,13 +78,14 @@ spec:
             fieldRef:
               apiVersion: v1
               fieldPath: metadata.namespace
-        image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
+        image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         name: {{ include "common.name" . }}-readiness
       - command:
         -  sh
         - -exec
         - |
+          rm -rf '/var/lib/kafka/data/lost+found';
           chown -R 1000:0 /var/lib/kafka/data;
         image: "{{ .Values.busyBoxRepository }}/{{ .Values.busyBoxImage }}"
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
@@ -96,13 +100,13 @@ spec:
         - "cd /config-input  && for PFILE in `ls -1 .`; do envsubst <${PFILE} >/etc/kafka/secrets/jaas/${PFILE}; done"
         env:
         - name: ZK_ADMIN
-          {{- include "common.secret.envFromSecret" (dict "global" . "uid" "zk-client" "key" "login") | indent 10 }}
+          {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "zk-client" "key" "login") | indent 10 }}
         - name: ZK_PSWD
-          {{- include "common.secret.envFromSecret" (dict "global" . "uid" "zk-client" "key" "password") | indent 10 }}
+          {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "zk-client" "key" "password") | indent 10 }}
         - name: KAFKA_ADMIN
-          {{- include "common.secret.envFromSecret" (dict "global" . "uid" "kafka-admin" "key" "login") | indent 10 }}
+          {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "kafka-admin" "key" "login") | indent 10 }}
         - name: KAFKA_PSWD
-          {{- include "common.secret.envFromSecret" (dict "global" . "uid" "kafka-admin" "key" "password") | indent 10 }}
+          {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "kafka-admin" "key" "password") | indent 10 }}
         volumeMounts:
         - mountPath: /etc/kafka/secrets/jaas
           name: jaas-config
@@ -201,7 +205,7 @@ spec:
         - name: KAFKA_AUTHORIZER_CLASS_NAME
           value: "{{ .Values.kafka.authorizer }}"
         {{ else }}
-         - name: KAFKA_OPTS
+        - name: KAFKA_OPTS
           value: "{{ .Values.kafka.jaasOptions }}"
         - name: KAFKA_LISTENER_SECURITY_PROTOCOL_MAP
           value: "{{ .Values.kafka.protocolMap }}"
@@ -283,4 +287,4 @@ spec:
             storage: {{ .Values.persistence.size | quote }}
 {{ end }}
       imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
\ No newline at end of file
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"