[OOF] Service Mesh Compliance for OOF
[oom.git] / kubernetes / oof / components / oof-has / components / oof-has-api / templates / deployment.yaml
index 3ed20ba..4e38c83 100755 (executable)
@@ -44,8 +44,10 @@ spec:
         args:
         - --container-name
         - oof-has-controller
+        {{- if (include "common.needTLS" .) }}
         - --container-name
         - aaf-service
+        {{- end }}
         env:
         - name: NAMESPACE
           valueFrom:
@@ -55,6 +57,7 @@ spec:
         image: {{ include "repositoryGenerator.image.readiness" . }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
 
+      {{- if (include "common.needTLS" .) }}
       - name: {{ include "common.name" . }}-has-sms-readiness
         command:
         - sh
@@ -73,6 +76,7 @@ spec:
               fieldPath: metadata.namespace
         image: {{ include "repositoryGenerator.image.curl" . }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+      {{- end }}
 {{ include "common.certInitializer.initContainer" . | indent 6 }}
 
       containers:
@@ -108,9 +112,11 @@ spec:
           - mountPath: /usr/local/bin/log.conf
             name: {{ .Values.global.commonConfigPrefix  }}-config
             subPath: log.conf
+          {{- if (include "common.needTLS" .) }}
           - mountPath: /usr/local/bin/AAF_RootCA.cer
             name: {{ include "common.fullname" . }}-onap-certs
             subPath: aaf_root_ca.cer
+          {{- end }}
           resources:
 {{ include "common.resources" . | indent 12 }}
         - name: {{ include "common.name" . }}-nginx
@@ -121,8 +127,10 @@ spec:
           args:
           - "-c"
           - |
+            {{- if (include "common.needTLS" .) }}
             grep -v '^$'  /opt/bitnami/nginx/ssl/local/org.onap.oof.crt > /tmp/oof.crt
             cat /tmp/oof.crt /tmp/intermediate_root_ca.pem /tmp/AAF_RootCA.cer >> /opt/bitnami/nginx/org.onap.oof.crt
+            {{- end }}
             /opt/bitnami/scripts/nginx/entrypoint.sh /opt/bitnami/scripts/nginx/run.sh
           ports:
           - containerPort: {{ .Values.service.internalPort }}
@@ -146,12 +154,14 @@ spec:
           - mountPath: /opt/bitnami/nginx/conf/nginx.conf
             name: {{ .Values.global.commonConfigPrefix  }}-config
             subPath: nginx.conf
+          {{- if (include "common.needTLS" .) }}
           - mountPath: /tmp/AAF_RootCA.cer
             name: {{ include "common.fullname" . }}-onap-certs
             subPath: aaf_root_ca.cer
           - mountPath: /tmp/intermediate_root_ca.pem
             name: {{ include "common.fullname" . }}-onap-certs
             subPath: intermediate_root_ca.pem
+          {{- end }}
           resources:
 {{ include "common.resources" . | indent 12 }}
         {{- if .Values.nodeSelector }}
@@ -178,6 +188,8 @@ spec:
               path: conductor.conf
             - key: log.conf
               path: log.conf
+{{- if (include "common.needTLS" .) }}
 {{ include "oof.certificate.volume" . | indent 8 }}
+{{- end }}
       imagePullSecrets:
       - name: "{{ include "common.namespace" . }}-docker-registry-key"