Merge "[DCAEGEN2] Ves-open-api Add mech to load config at deploy time"
[oom.git] / kubernetes / cds / components / cds-sdc-listener / templates / deployment.yaml
index 7dca49c..d01e3b0 100644 (file)
@@ -1,5 +1,6 @@
 {{/*
 # Copyright (c) 2019 Bell Canada
+# Modification Copyright © 2022 Nordix Foundation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -42,8 +43,6 @@ spec:
             - --container-name
             - sdc-be
             - --container-name
-            - message-router
-            - --container-name
             - cds-blueprints-processor
           env:
           - name: NAMESPACE
@@ -61,20 +60,27 @@ spec:
           env:
           - name: APP_CONFIG_HOME
             value: {{ .Values.config.appConfigDir }}
+          - name: SECURITY_PROTOCOL
+            value: {{ .Values.config.kafka.securityProtocol }}
+          - name: SASL_MECHANISM
+            value: {{ .Values.config.kafka.saslMechanism }}
+          - name: SASL_JAAS_CONFIG
+            value: {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cds-sdc-kafka-secret" "key" "sasl.jaas.config") | indent 12 }}
           ports:
           - containerPort: {{ .Values.service.http.internalPort }}
+            name: {{ .Values.service.http.portName }}
           {{ if .Values.liveness.enabled }}
           livenessProbe:
             httpGet:
               path: /api/v1/sdclistener/healthcheck
-              port: {{ .Values.service.http.internalPort }}
+              port: {{ .Values.service.http.portName }}
             initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
             periodSeconds: {{ .Values.liveness.periodSeconds }}
           {{end}}
           readinessProbe:
             httpGet:
               path: /api/v1/sdclistener/healthcheck
-              port: {{ .Values.service.http.internalPort }}
+              port: {{ .Values.service.http.portName }}
             initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
             periodSeconds: {{ .Values.readiness.periodSeconds }}
           volumeMounts:
@@ -94,6 +100,7 @@ spec:
         affinity:
 {{ toYaml .Values.affinity | indent 10 }}
         {{- end }}
+      serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
       volumes:
         - name: {{ include "common.fullname" . }}-config
           configMap: