[DCAEGEN2] Updates to bootstrap and cm-container
[oom.git] / kubernetes / dcaegen2 / components / dcae-bootstrap / templates / deployment.yaml
index 13657bd..ac37bee 100644 (file)
@@ -1,7 +1,9 @@
+{{/*
 #============LICENSE_START========================================================
 # ================================================================================
-# Copyright (c) 2017-2019 AT&T Intellectual Property. All rights reserved.
+# Copyright (c) 2017-2020 AT&T Intellectual Property. All rights reserved.
 # Modifications Copyright © 2018 Amdocs, Bell Canada
+# Copyright (c) 2021 J. F. Lucas.  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.
@@ -15,8 +17,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 # ============LICENSE_END=========================================================
+*/}}
 
-apiVersion: extensions/v1beta1
+apiVersion: apps/v1
 kind: Deployment
 metadata:
   name: {{ include "common.fullname" . }}
@@ -28,6 +31,9 @@ metadata:
     heritage: {{ .Release.Service }}
 spec:
   replicas: 1
+  selector:
+    matchLabels:
+      app: {{ include "common.name" . }}
   template:
     metadata:
       labels:
@@ -48,15 +54,15 @@ spec:
           name: {{ include "common.fullname" . }}-dcae-inputs-input
         - mountPath: /config
           name: {{ include "common.fullname" . }}-dcae-inputs
-        image: "{{ .Values.global.envsubstImage }}"
+        image: {{ include "repositoryGenerator.image.envsubst" . }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         name: {{ include "common.name" . }}-update-config
 
       - name: {{ include "common.name" . }}-readiness
-        image: {{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}
+        image: {{ include "repositoryGenerator.image.readiness" . }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         command:
-          - /root/ready.py
+          - /app/ready.py
         args:
           - --container-name
           - dcae-cloudify-manager
@@ -89,14 +95,14 @@ spec:
               fieldPath: status.podIP
         - name: aaf_locator_fqdn
           value: dcae
-        image: {{ .Values.global.tlsRepository }}/{{ .Values.global.tlsImage }}
+        image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.global.tlsImage }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         resources: {}
         volumeMounts:
         - mountPath: /opt/app/osaaf
           name: tls-info
       - name: init-consul
-        image: {{ .Values.global.consulLoaderRepository }}/{{ .Values.global.consulLoaderImage }}
+        image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.global.consulLoaderImage }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         args:
         - --service
@@ -106,15 +112,13 @@ spec:
         resources: {}
       containers:
         - name: {{ include "common.name" . }}
-          image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+          image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           resources:
 {{ include "common.resources" . | indent 12 }}
           volumeMounts:
             - mountPath: /inputs
               name: {{ include "common.fullname" . }}-dcae-inputs
-            - mountPath: /dcae-configs
-              name: {{ include "common.fullname" . }}-dcae-config
             - mountPath: /etc/localtime
               name: localtime
               readOnly: true
@@ -125,10 +129,7 @@ spec:
             - name: CMADDR
               value: {{ .Values.config.address.cm.host }}
             - name: CMPASS
-              valueFrom:
-                secretKeyRef:
-                  name: {{ include "common.name" . }}-cmpass
-                  key: password
+              {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cm-pass" "key" "password") | indent 14}}
             - name: CMPROTO
               value: {{ .Values.config.address.cm.proto }}
             - name: CMPORT
@@ -146,9 +147,6 @@ spec:
         - name: {{ include "common.fullname" . }}-dcae-inputs
           emptyDir:
             medium: Memory
-        - name: {{ include "common.fullname" . }}-dcae-config
-          configMap:
-            name: {{ include "common.fullname" . }}-dcae-config
         - name: localtime
           hostPath:
             path: /etc/localtime