[GENERAL] Use readiness container v3.0.1
[oom.git] / kubernetes / dcaegen2 / components / dcae-dashboard / templates / deployment.yaml
index a926fb3..e46901b 100644 (file)
@@ -15,7 +15,7 @@
 # limitations under the License.
 # ============LICENSE_END=========================================================
 
-apiVersion: extensions/v1beta1
+apiVersion: apps/v1
 kind: Deployment
 metadata:
   name: {{ include "common.fullname" . }}
@@ -27,6 +27,9 @@ metadata:
     heritage: {{ .Release.Service }}
 spec:
   replicas: 1
+  selector:
+    matchLabels:
+      app: {{ include "common.name" . }}
   template:
     metadata:
       labels:
@@ -35,10 +38,10 @@ spec:
     spec:
       initContainers:
         - name: {{ include "common.name" . }}-readiness
-          image: {{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}
+          image: {{ include "common.repository" . }}/{{ .Values.global.readinessImage }}
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           command:
-            - /root/ready.py
+            - /app/ready.py
           args:
           - --container-name
           - dcae-cloudify-manager
@@ -126,11 +129,11 @@ spec:
             - name: consul_url
               value: http://consul-server-ui:8500
             - name: postgres_user_dashboard
-              value: {{ .Values.postgres.config.pgUserName }}
+              {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pg-user-creds" "key" "login") | indent 14 }}
+            - name: postgres_password_dashboard
+              {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pg-user-creds" "key" "password") | indent 14 }}
             - name: postgres_db_name
               value: {{ .Values.postgres.config.pgDatabase }}
-            - name: postgres_password_dashboard
-              value: {{ .Values.postgres.config.pgUserPassword }}
             - name: postgres_ip
               value: {{ .Values.postgres.service.name2 }}
             - name: POD_IP
@@ -169,4 +172,3 @@ spec:
           name: tls-info
       imagePullSecrets:
       - name: "{{ include "common.namespace" . }}-docker-registry-key"
-