summaryrefslogtreecommitdiffstats
path: root/kubernetes/policy/templates/job.yaml
diff options
context:
space:
mode:
authorKrzysztof Opasiak <k.opasiak@samsung.com>2020-04-01 22:33:58 +0200
committerjhh <jorge.hernandez-herrero@att.com>2020-04-10 15:43:22 -0500
commit98a79cc52d63ae1218aff2b0043fedf9536f235a (patch)
tree949e0bd81fc7e7f58812c7d2ebc518086e1864d1 /kubernetes/policy/templates/job.yaml
parent9f66ecee20e4fde39ced729b856e68af1ab31bb6 (diff)
[POLICY] Use common secret template in whole policy module
All subcharts are ready so now we can remove hardcoded mariadb credentials in policy module and depend on common secret chart to generate them for us at the deployment time. Issue-ID: OOM-2342 Change-Id: I84bfc30511312be0b2e614ddff4676f36d85619b Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com> Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Diffstat (limited to 'kubernetes/policy/templates/job.yaml')
-rw-r--r--kubernetes/policy/templates/job.yaml7
1 files changed, 2 insertions, 5 deletions
diff --git a/kubernetes/policy/templates/job.yaml b/kubernetes/policy/templates/job.yaml
index 81904143fa..f6a1ace3dc 100644
--- a/kubernetes/policy/templates/job.yaml
+++ b/kubernetes/policy/templates/job.yaml
@@ -57,14 +57,11 @@ spec:
- /dbcmd-config/db.sh
env:
- name: MYSQL_ROOT_PASSWORD
- valueFrom:
- secretKeyRef:
- name: {{ template "common.fullname" . }}-secret
- key: db-root-password
+ {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-root-password" "key" "password") | indent 10 }}
- name: MYSQL_HOST
value: "{{ index .Values "mariadb-galera" "service" "name" }}"
- name: MYSQL_USER
- value: "{{ index .Values "mariadb-galera" "config" "userName" }}"
+ {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 10 }}
- name: MYSQL_PORT
value: "{{ index .Values "mariadb-galera" "service" "internalPort" }}"
restartPolicy: Never