DMaaP MR fixes
[oom.git] / kubernetes / dmaap / components / message-router / charts / message-router-kafka / templates / statefulset.yaml
index cc8fd5a..bfe4b11 100644 (file)
@@ -70,6 +70,26 @@ spec:
         image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         name: {{ include "common.name" . }}-readiness
+      - command:
+        -  sh
+        - -exec
+        - |
+          chown -R 1000:1000 /opt/kafka/data;
+          cp /opt/kafka/tmpconfig/server.properties /opt/kafka/config/;
+          chown 1000:1000 /opt/kafka/config/server.properties;
+          cd /opt/kafka/config;
+          ls;
+        image: "{{ .Values.busyBoxRepository }}/{{ .Values.busyBoxImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        volumeMounts:
+        - mountPath: /opt/kafka/data
+          name: kafka-data
+        - mountPath: /opt/kafka/tmpconfig/server.properties
+          subPath: server.properties
+          name: server
+        - mountPath: /opt/kafka/config
+          name: config-data
+        name: {{ include "common.name" . }}-permission-fixer
       containers:
       - name: {{ include "common.name" .  }}
         image: "{{ include "common.repository" . }}/{{ .Values.image }}"
@@ -105,39 +125,28 @@ spec:
             fieldRef:
               apiVersion: v1
               fieldPath: status.hostIP
-        - name: KAFKA_ZOOKEEPER_CONNECT
-          value: "{{.Values.zookeeper.name}}:{{.Values.zookeeper.port}}"
-        - name: KAFKA_LISTENER_SECURITY_PROTOCOL_MAP
-          value: "INTERNAL_SASL_PLAINTEXT:SASL_PLAINTEXT,EXTERNAL_SASL_PLAINTEXT:SASL_PLAINTEXT"
-        - name: KAFKA_LISTENERS
-          value: "EXTERNAL_SASL_PLAINTEXT://0.0.0.0:{{ .Values.service.externalPort }},INTERNAL_SASL_PLAINTEXT://0.0.0.0:{{ .Values.service.internalPort }}"
-        - name: KAFKA_INTER_BROKER_LISTENER_NAME
-          value: "INTERNAL_SASL_PLAINTEXT"
-        - name: KAFKA_SASL_ENABLED_MECHANISMS
-          value: "PLAIN"
-        - name: KAFKA_SASL_MECHANISM_INTER_BROKER_PROTOCOL
-          value: "PLAIN"
-        - name: KAFKA_AUTHORIZER_CLASS_NAME
-          value: "{{ .Values.kafkaCustomAuthorizer }}"
-        - name: KAFKA_DELETE_TOPIC_ENABLE
-          value: "{{ .Values.deleteTopicEnable }}"
         - name: aaf_locate_url
-          value: "https://aaf-locate:8095"
-        - name: KAFKA_LOG_DIRS
-          value: "kafka/logs"
-        - name: KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR
-          value: "{{ .Values.replicaCount }}"
-        - name: KAFKA_DEFAULT_REPLICATION_FACTOR
-          value: "{{ .Values.replicaCount }}"
-        - name: KAFKA_NUM_PARTITIONS
-          value: "{{ .Values.defaultpartitions }}"
+          value: https://aaf-locate.{{ include "common.namespace" . }}:8095
+
         volumeMounts:
         - mountPath: /etc/localtime
           name: localtime
           readOnly: true
         - mountPath: /var/run/docker.sock
           name: docker-socket
-        - mountPath: /kafka
+        - mountPath: /opt/kafka/tmpconfig/server.properties
+          subPath: server.properties
+          name: server
+        - mountPath: /opt/kafka/config/server.properties
+          subPath: server.properties
+          name: config-data
+        - mountPath: /opt/kafka/config/log4j.properties
+          subPath: log4j.properties
+          name: log4j
+        - mountPath: /opt/kafka/config/cadi.properties
+          subPath: cadi.properties
+          name: cadi
+        - mountPath: /opt/kafka/data
           name: kafka-data
       {{- if .Values.tolerations }}
       tolerations:
@@ -147,9 +156,20 @@ spec:
       - name: localtime
         hostPath:
           path: /etc/localtime
+      - name: config-data
+        emptyDir: {}
       - name: docker-socket
         hostPath:
           path: /var/run/docker.sock
+      - name: server
+        configMap:
+          name: {{ include "common.fullname" . }}-server-prop-configmap
+      - name: log4j
+        configMap:
+          name: {{ include "common.fullname" . }}-log4j-prop-configmap
+      - name: cadi
+        configMap:
+          name: {{ include "common.fullname" . }}-cadi-prop-configmap
 {{ if not .Values.persistence.enabled }}
       - name: kafka-data
         emptyDir: {}
@@ -176,4 +196,4 @@ spec:
             heritage: "{{ .Release.Service }}"
 {{ end }}
       imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
\ No newline at end of file