X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Fpolicy%2Fcomponents%2Fpolicy-distribution%2Ftemplates%2Fdeployment.yaml;h=7a3f6d78a371337193cfc24b5707a41a8b564df3;hb=a7ac7f022a8d2553d637ad8bf5fe3f12b65aa76e;hp=414d617f77244f0f4e0f575d93bdae1bfb8581a4;hpb=70f269ea180517b0f6878fb34e65e61cde3a3b2c;p=oom.git diff --git a/kubernetes/policy/components/policy-distribution/templates/deployment.yaml b/kubernetes/policy/components/policy-distribution/templates/deployment.yaml index 414d617f77..7a3f6d78a3 100755 --- a/kubernetes/policy/components/policy-distribution/templates/deployment.yaml +++ b/kubernetes/policy/components/policy-distribution/templates/deployment.yaml @@ -1,3 +1,4 @@ +{{/* # ============LICENSE_START======================================================= # Copyright (C) 2020 AT&T Intellectual Property. # ================================================================================ @@ -15,6 +16,7 @@ # # SPDX-License-Identifier: Apache-2.0 # ============LICENSE_END========================================================= +*/}} apiVersion: apps/v1 kind: Deployment @@ -65,26 +67,31 @@ spec: name: distributionconfig-input - mountPath: /config name: distributionconfig - image: "{{ .Values.global.envsubstImage }}" + image: {{ include "repositoryGenerator.image.envsubst" . }} imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} name: {{ include "common.name" . }}-update-config {{ include "common.certInitializer.initContainer" . | indent 6 }} containers: - name: {{ include "common.name" . }} - image: "{{ include "common.repository" . }}/{{ .Values.image }}" + image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }} imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + env: + - name: SASL_JAAS_CONFIG + valueFrom: + secretKeyRef: + name: {{ include "common.name" . }}-ku + key: sasl.jaas.config {{- if .Values.global.aafEnabled }} - command: ["bash","-c"] + command: ["sh","-c"] args: ["source {{ .Values.certInitializer.credsPath }}/.ci;\ /opt/app/policy/distribution/bin/policy-dist.sh /opt/app/policy/distribution/etc/mounted/config.json"] {{- else }} - command: ["/opt/app/policy/distribution/bin/policy-dist.sh"] - args: ["/opt/app/policy/distribution/etc/mounted/config.json"] - env: - name: KEYSTORE_PASSWD {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "keystore-password" "key" "password") | indent 12 }} - name: TRUSTSTORE_PASSWD {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "truststore-password" "key" "password") | indent 12 }} + command: ["/opt/app/policy/distribution/bin/policy-dist.sh"] + args: ["/opt/app/policy/distribution/etc/mounted/config.json"] {{- end }} ports: - containerPort: {{ .Values.service.internalPort }} @@ -109,8 +116,7 @@ spec: readOnly: true - mountPath: /opt/app/policy/distribution/etc/mounted name: distributionconfig - resources: -{{ include "common.resources" . }} + resources: {{ include "common.resources" . | nindent 12 }} {{- if .Values.nodeSelector }} nodeSelector: {{ toYaml .Values.nodeSelector | indent 10 }} @@ -119,6 +125,7 @@ spec: affinity: {{ toYaml .Values.affinity | indent 10 }} {{- end }} + serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}} volumes: {{ include "common.certInitializer.volumes" . | indent 8 }} - name: localtime