[CPS] Add credentials for service basic auth
[oom.git] / kubernetes / cps / templates / deployment.yaml
index 4f87d20..59062cc 100755 (executable)
@@ -1,6 +1,6 @@
 {{/*
 # 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");
@@ -70,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 }}