[DMAAP] DMaaP ServiceMesh compatibility
[oom.git] / kubernetes / dmaap / components / message-router / components / message-router-kafka / templates / statefulset.yaml
index 62a25e6..ebb5f7e 100644 (file)
@@ -166,9 +166,15 @@ spec:
               apiVersion: v1
               fieldPath: status.hostIP
         - name: KAFKA_ZOOKEEPER_CONNECT
-          value: {{ include "common.release" . }}-{{.Values.zookeeper.name}}-0.{{.Values.zookeeper.name}}.{{.Release.Namespace}}.svc.cluster.local:{{.Values.zookeeper.port}},{{ include "common.release" . }}-{{.Values.zookeeper.name}}-1.{{.Values.zookeeper.name}}.{{.Release.Namespace}}.svc.cluster.local:{{.Values.zookeeper.port}},{{ include "common.release" . }}-{{.Values.zookeeper.name}}-2.{{.Values.zookeeper.name}}.{{.Release.Namespace}}.svc.cluster.local:{{.Values.zookeeper.port}}
+          value: "{{ include "common.kafkaNodes" (dict "dot" . "replicaCount" .Values.zookeeper.replicaCount "componentName" .Values.zookeeper.name "port" .Values.zookeeper.port ) }}"
         - name: KAFKA_CONFLUENT_SUPPORT_METRICS_ENABLE
           value: "{{ .Values.kafka.enableSupport }}"
+        - name: KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR
+          value: "{{ .Values.config.offsets_topic_replication_factor | default .Values.replicaCount }}"
+        - name: KAFKA_NUM_PARTITIONS
+          value: "{{ .Values.config.num_partition | default .Values.replicaCount }}"
+        - name:  KAFKA_DEFAULT_REPLICATION_FACTOR
+          value: "{{ .Values.config.default_replication_factor | default .Values.replicaCount }}"
         {{- if  .Values.global.aafEnabled }}
         - name: KAFKA_OPTS
           value: "{{ .Values.kafka.jaasOptionsAaf }}"
@@ -220,6 +226,7 @@ spec:
       tolerations:
         {{ toYaml .Values.tolerations | indent 10 }}
       {{- end }}
+      serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
       volumes:  {{ include "common.certInitializer.volumes" . | nindent 6 }}
       - name: localtime
         hostPath:
@@ -230,11 +237,6 @@ spec:
       - name: docker-socket
         hostPath:
           path: /var/run/docker.sock
-      {{- if .Values.global.aafEnabled }}
-      - name: cadi
-        configMap:
-          name: {{ include "common.fullname" . }}-cadi-prop-configmap
-      {{ end }}
       - name: jaas
         configMap:
           name: {{ include "common.fullname" . }}-jaas-configmap