diff options
author | Sylvain Desbureaux <sylvain.desbureaux@orange.com> | 2020-05-11 07:11:13 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-05-11 07:11:13 +0000 |
commit | 986ac0e14836ad904e8bb8f6ecf49cb0fe83df5e (patch) | |
tree | d91d97419d62552addda6651d0a7b7bd0ef8f5b1 /kubernetes/vnfsdk/templates/deployment.yaml | |
parent | d451bedd8fac229c70feb767622675b09f4d968e (diff) | |
parent | f427199dd4e058b0fb023aa62a97f1b9e1d20ab5 (diff) |
Merge "[VNFSDK] Use common secret template for postgres credentials" into frankfurt
Diffstat (limited to 'kubernetes/vnfsdk/templates/deployment.yaml')
-rw-r--r-- | kubernetes/vnfsdk/templates/deployment.yaml | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/kubernetes/vnfsdk/templates/deployment.yaml b/kubernetes/vnfsdk/templates/deployment.yaml index bd187db286..3f4d6c43eb 100644 --- a/kubernetes/vnfsdk/templates/deployment.yaml +++ b/kubernetes/vnfsdk/templates/deployment.yaml @@ -35,6 +35,25 @@ spec: spec: initContainers: - command: + - sh + args: + - -c + - "cd /config-input && for PFILE in `find . -not -type d | grep -v -F ..`; do envsubst <${PFILE} >/config/${PFILE}; done" + env: + - name: PG_USER + {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pg-user-creds" "key" "login") | indent 10 }} + - name: PG_PASSWORD + {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pg-user-creds" "key" "password") | indent 10 }} + volumeMounts: + - mountPath: /config-input + name: init-data-input + - mountPath: /config + name: init-data + image: "{{ .Values.global.envsubstImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + name: {{ include "common.name" . }}-update-config + + - command: - /root/ready.py args: - --container-name @@ -54,9 +73,10 @@ spec: name: {{ include "common.name" . }} resources: {{ include "common.resources" . | indent 12 }} - env: - - name: POSTGRES_SERVICE_HOST - value: "$(VNFSDK_DBSET_SERVICE_HOST)" + volumes: + - mountPath: /service/webapps/ROOT/WEB-INF/classes/mybatis/configuration/configuration.xml + name: init-data + subPath: configuration.xml readinessProbe: tcpSocket: port: {{ .Values.service.internalPort }} @@ -64,3 +84,10 @@ spec: periodSeconds: {{ .Values.readiness.periodSeconds }} imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" + volumes: + - name: init-data-input + configMap: + name: {{ include "common.fullname" . }} + - name: init-data + emptyDir: + medium: Memory |