[DCAE][DCAEMOD] Deploy R7 container images
[oom.git] / kubernetes / dcaegen2 / components / dcae-inventory-api / templates / deployment.yaml
index 2bfb01d..47b3312 100644 (file)
@@ -34,6 +34,25 @@ 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 }}
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
@@ -42,6 +61,8 @@ spec:
           args:
             - --container-name
             - {{ .Values.postgres.nameOverride }}
+            - --container-name
+            - aaf-cm
             - "-t"
             - "15"
           env:
@@ -52,6 +73,8 @@ spec:
                 fieldPath: metadata.namespace
         - name: init-tls
           env:
+          - name: aaf_locator_fqdn
+            value: dcae
           - name: POD_IP
             valueFrom:
               fieldRef:
@@ -61,7 +84,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" . }}
@@ -101,13 +124,44 @@ spec:
               subPath: config.json
             - mountPath: /opt/cert/
               name: tls-info
+            - mountPath: /opt/logs/
+              name: component-log
           env:
             - name: CONSUL_HOST
               value: consul.{{ include "common.namespace" . }}
+        - name: {{ include "common.name" . }}-filebeat
+          env:
+            - name: POD_IP
+              valueFrom:
+                fieldRef:
+                  apiVersion: v1
+                  fieldPath: status.podIP
+          image: {{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}
+          imagePullPolicy: IfNotPresent
+          resources: {}
+          volumeMounts:
+          - mountPath: /var/log/onap/inventory
+            name: component-log
+          - mountPath: /usr/share/filebeat/data
+            name: filebeat-data
+          - mountPath: /usr/share/filebeat/filebeat.yml
+            name: filebeat-conf
+            subPath: filebeat.yml
       volumes:
-        - name: {{ include "common.fullname" . }}-inv-config
+        - emptyDir: {}
+          name: component-log
+        - emptyDir: {}
+          name: filebeat-data
+        - configMap:
+            defaultMode: 420
+            name: {{ include "common.fullname" . }}-filebeat-configmap
+          name: filebeat-conf
+        - 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: