[AAI-SDC-DIST] Updgrade AAI to use kafka native
[oom.git] / kubernetes / aai / components / aai-modelloader / templates / deployment.yaml
index 47c13af..d3136d8 100644 (file)
@@ -28,6 +28,13 @@ metadata:
     heritage: {{ .Release.Service }}
 spec:
   replicas: {{ .Values.replicaCount }}
+  strategy:
+    type: {{ .Values.updateStrategy.type }}
+    {{- if (eq "RollingUpdate" .Values.updateStrategy.type) }}
+    rollingUpdate:
+      maxUnavailable: {{ .Values.updateStrategy.maxUnavailable }}
+      maxSurge: {{ .Values.updateStrategy.maxSurge }}
+    {{- end }}
   selector:
     matchLabels:
       app: {{ include "common.name" . }}
@@ -95,6 +102,12 @@ spec:
         env:
         - name: CONFIG_HOME
           value: /opt/app/model-loader/config/
+        - 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" "aai-sdc-kafka-secret" "key" "sasl.jaas.config") | indent 10 }}
         volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 8 }}
         - mountPath: /etc/localtime
           name: localtime