X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=kubernetes%2Foof%2Fcharts%2Foof-cmso%2Fcharts%2Foof-cmso-optimizer%2Ftemplates%2Fdeployment.yaml;h=c2d6f8c7ef422170e0a46c0ff28875713eb0a562;hb=abb75e020a15cdc96be2bceae57dec90e22a1dca;hp=4e418bf7562b9e361dd6c98a296b8222c24e5e60;hpb=66dfea6665106cc179078a7ad52e5031637ab341;p=oom.git diff --git a/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-optimizer/templates/deployment.yaml b/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-optimizer/templates/deployment.yaml index 4e418bf756..c2d6f8c7ef 100644 --- a/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-optimizer/templates/deployment.yaml +++ b/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-optimizer/templates/deployment.yaml @@ -20,7 +20,7 @@ metadata: labels: app: {{ include "common.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} heritage: {{ .Release.Service }} spec: replicas: {{ .Values.replicaCount }} @@ -28,14 +28,14 @@ spec: metadata: labels: app: {{ include "common.name" . }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} spec: initContainers: - command: - /root/ready.py args: - --container-name - - {{ .Values.mariadb.nameOverride }} + - {{ .Values.config.db.container }} env: - name: NAMESPACE valueFrom: @@ -50,50 +50,46 @@ spec: imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} env: - name: DB_HOST - value: {{ .Values.config.db_host }}.{{.Release.Namespace}} + value: {{ .Values.config.db.host }}.{{.Release.Namespace}} - name: DB_PORT - value: {{ .Values.config.db_port | quote}} + value: {{ .Values.config.db.port | quote}} - name: DB_USERNAME - value: {{ .Values.config.db_root }} + value: {{ .Values.config.db.root }} - name: DB_SCHEMA - value: {{ .Values.config.mysqlDatabase }} + value: {{ .Values.config.db.mysqlDatabase }} - name: DB_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Release.Name}}-cmso-db - key: db-root-password + {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cmso-db-root-password" "key" "password") | indent 10}} terminationMessagePolicy: File volumeMounts: - name: {{ include "common.fullname" . }}-config mountPath: /share/etc/config - - name: {{ include "common.fullname" . }}-logs + - name: {{ include "common.fullname" . }}-logs mountPath: /share/logs containers: - name: {{ include "common.name" . }} image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} env: - - name: TOPOLOGY_HOST - value: {{ .Values.config.topology_host }}.{{.Release.Namespace}} - - name: TOPOLOGY_PORT - value: {{ .Values.config.topology_port | quote}} - - name: TICKETMGT_HOST - value: {{ .Values.config.ticketmgt_host }}.{{.Release.Namespace}} - - name: TICKETMGT_PORT - value: {{ .Values.config.ticketmgt_port | quote}} - name: DB_HOST - value: {{ .Values.config.db_host }}.{{.Release.Namespace}} + value: {{ .Values.config.db.host }}.{{.Release.Namespace}} - name: DB_PORT - value: {{ .Values.config.db_port | quote}} + value: {{ .Values.config.db.port | quote}} - name: DB_USERNAME - value: {{ .Values.config.db_root }} + value: {{ .Values.config.db.root }} - name: DB_SCHEMA - value: {{ .Values.config.mysqlDatabase }} + value: {{ .Values.config.db.mysqlDatabase }} - name: DB_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Release.Name}}-cmso-db - key: db-root-password + {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cmso-db-root-password" "key" "password") | indent 10}} + - name: JAVA_TRUSTSTORE + value: /share/etc/certs/{{ .Values.global.truststoreFile }} + - name: SSL_KEYSTORE + value: /share/etc/certs/{{ .Values.global.keystoreFile }} + - name: JAVA_TRUSTSTORE_PASSWORD + value: {{ .Values.global.truststorePassword }} + - name: SSL_KEYSTORE_PASSWORD + value: {{ .Values.global.keystorePassword }} + - name: AUTHENTICATION + value: {{ .Values.global.authentication }} ports: - containerPort: {{ .Values.service.internalPort }} # disable liveness probe when breakpoints set in debugger @@ -116,7 +112,11 @@ spec: - name: {{ include "common.fullname" . }}-logs mountPath: /share/debug-logs - name: {{ include "common.fullname" . }}-config - mountPath: /share/etc/config + mountPath: /share/etc/config + - name: {{ include "common.fullname" . }}-certs + mountPath: /share/etc/certs + - name: {{ include "common.fullname" . }}-certs + mountPath: /opt/app/cmso/src/main/resources/aaf resources: {{ include "common.resources" . | indent 12 }} {{- if .Values.nodeSelector }} @@ -142,5 +142,8 @@ spec: path: liquibase.properties - name: {{ include "common.fullname" . }}-logs emptyDir: {} + - name: {{ include "common.fullname" . }}-certs + secret: + secretName: {{ include "common.release" . }}-{{ .Values.global.commonConfigPrefix }}-certs imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key"