[CPS] Add credentials for service basic auth
[oom.git] / kubernetes / cps / templates / deployment.yaml
old mode 100644 (file)
new mode 100755 (executable)
index e15ae71..59062cc
@@ -1,6 +1,7 @@
 {{/*
 # Copyright (C) 2021 Pantheon.tech, Orange
-# Modifications Copyright (C) 2020 Bell Canada. All rights reserved.
+# Modifications Copyright (C) 2021 Bell Canada.
+# Modifications Copyright (C) 2021 Nordix Foundation. All rights reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -40,6 +41,8 @@ spec:
             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pg-user-creds" "key" "login") | indent 12 }}
           - name: DB_PASSWORD
             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pg-user-creds" "key" "password") | indent 12 }}
+          - name: LIQUIBASE_LABELS
+            value: {{ .Values.config.liquibaseLabels }}
         volumeMounts:
           - mountPath: /config-input
             name: init-data-input
@@ -67,6 +70,11 @@ spec:
             path: {{ .Values.readiness.path }}
           initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
           periodSeconds: {{ .Values.readiness.periodSeconds }}
+        env:
+          - name: CPS_USERNAME
+            {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "app-user-creds" "key" "login") | indent 12 }}
+          - name: CPS_PASSWORD
+            {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "app-user-creds" "key" "password") | indent 12 }}
         resources: {{ include "common.resources" . | nindent 10 }}
         {{- if .Values.nodeSelector }}
         nodeSelector: {{ toYaml .Values.nodeSelector | nindent 12 }}