X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Fdcaegen2%2Fcomponents%2Fdcae-inventory-api%2Ftemplates%2Fdeployment.yaml;h=a39c4d27a143da31405969e4e2172b6764c25c63;hb=860e4d4c5f71a9bc9f70b7e1127f6a89ef209034;hp=f056079fe4d41f61fcf7b49e3c1d747f73406dda;hpb=b61a71b57b1822ca4a1611e7ff977bb8a0ef3c53;p=oom.git diff --git a/kubernetes/dcaegen2/components/dcae-inventory-api/templates/deployment.yaml b/kubernetes/dcaegen2/components/dcae-inventory-api/templates/deployment.yaml index f056079fe4..a39c4d27a1 100644 --- a/kubernetes/dcaegen2/components/dcae-inventory-api/templates/deployment.yaml +++ b/kubernetes/dcaegen2/components/dcae-inventory-api/templates/deployment.yaml @@ -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: @@ -34,14 +37,35 @@ spec: release: {{ include "common.release" . }} spec: initContainers: + - command: + - sh + args: + - -c + - "cd /config-input && for PFILE in `find . -not -type d | grep -v -F ..`; do envsubst <${PFILE} >/config/${PFILE}; done" + env: + - name: PG_USER + {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pg-user-creds" "key" "login") | indent 12 }} + - name: PG_PASSWORD + {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pg-user-creds" "key" "password") | indent 12 }} + volumeMounts: + - mountPath: /config-input + name: {{ include "common.fullname" . }}-inv-config-input + - mountPath: /config + name: {{ include "common.fullname" . }}-inv-config + image: "{{ .Values.global.envsubstImage }}" + 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 "common.repository" . }}/{{ .Values.global.readinessImage }} imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} command: - - /root/ready.py + - /app/ready.py args: - --container-name - {{ .Values.postgres.nameOverride }} + - --container-name + - aaf-cm - "-t" - "15" env: @@ -52,6 +76,8 @@ spec: fieldPath: metadata.namespace - name: init-tls env: + - name: aaf_locator_fqdn + value: dcae - name: POD_IP valueFrom: fieldRef: @@ -61,7 +87,7 @@ spec: imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} resources: {} volumeMounts: - - mountPath: /opt/tls/shared + - mountPath: /opt/app/osaaf name: tls-info containers: - name: {{ include "common.name" . }} @@ -133,11 +159,13 @@ spec: defaultMode: 420 name: {{ include "common.fullname" . }}-filebeat-configmap name: filebeat-conf - - name: {{ include "common.fullname" . }}-inv-config + - name: {{ include "common.fullname" . }}-inv-config-input configMap: name: {{ include "common.fullname" . }}-configmap + - name: {{ include "common.fullname" . }}-inv-config + emptyDir: + medium: Memory - emptyDir: {} name: tls-info imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" -