Merge "Update Keystore cert"
[oom.git] / kubernetes / aai / charts / aai-data-router / templates / deployment.yaml
index 585cc4f..5c0d9b2 100644 (file)
@@ -35,6 +35,14 @@ spec:
         release: {{ .Release.Name }}
       name: {{ include "common.name" . }}
     spec:
+      {{- if .Values.nodeSelector }}
+      nodeSelector:
+{{ toYaml .Values.nodeSelector | indent 8 }}
+      {{- end -}}
+      {{- if .Values.affinity }}
+      affinity:
+{{ toYaml .Values.affinity | indent 8 }}
+      {{- end }}
       initContainers:
       - command:
         - /bin/sh
@@ -94,8 +102,17 @@ spec:
         - mountPath: /opt/app/data-router/dynamic/conf/entity-event-policy.xml
           subPath: entity-event-policy.xml
           name: {{ include "common.fullname" . }}-dynamic-policy
-        - mountPath: /logs/
+        - mountPath: /opt/app/data-router/dynamic/conf/data-router-oxm.xml
+          subPath: data-router-oxm.xml
+          name: {{ include "common.fullname" . }}-dynamic-oxm
+        - mountPath: /opt/app/data-router/bundleconfig/etc/logback.xml
+          name: {{ include "common.fullname" . }}-logback-config
+          subPath: logback.xml
+        - mountPath: /var/log/onap
           name: {{ include "common.fullname" . }}-logs
+        - mountPath: /logs
+          name: {{ include "common.fullname" . }}-logs
+
         ports:
         - containerPort: {{ .Values.service.internalPort }}
         {{- if eq .Values.liveness.enabled true }}
@@ -111,11 +128,33 @@ spec:
           initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
           periodSeconds: {{ .Values.readiness.periodSeconds }}
         resources:
-{{ toYaml (pluck .Values.flavor .Values.resources| first) | indent 12 }}
+{{ include "common.resources" . }}
+
+      # side car containers
+      - name: filebeat-onap
+        image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        volumeMounts:
+        - mountPath: /usr/share/filebeat/filebeat.yml
+          subPath: filebeat.yml
+          name: filebeat-conf
+        - mountPath: /var/log/onap
+          name: {{ include "common.fullname" . }}-logs
+        - mountPath: /logs
+          name: {{ include "common.fullname" . }}-logs
+        - mountPath: /usr/share/filebeat/data
+          name: aai-filebeat
+        resources:
+{{ include "common.resources" . }}
       volumes:
       - name: localtime
         hostPath:
           path: /etc/localtime
+      - name: filebeat-conf
+        configMap:
+          name: aai-filebeat
+      - name: aai-filebeat
+        emptyDir: {}
       - name: {{ include "common.fullname" . }}-auth
         secret:
           secretName: {{ include "common.fullname" . }}
@@ -133,9 +172,17 @@ spec:
       - name: {{ include "common.fullname" . }}-dynamic-policy
         configMap:
           name: {{ include "common.fullname" . }}-dynamic
+      - name: {{ include "common.fullname" . }}-dynamic-oxm
+        configMap:
+          name: {{ include "common.fullname" . }}-dynamic
       - name: {{ include "common.fullname" . }}-logs
-        hostPath:
-          path: {{ .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}
+        emptyDir: {}
+      - name: {{ include "common.fullname" . }}-logback-config
+        configMap:
+          name: {{ include "common.fullname" . }}-log-configmap
+          items:
+          - key: logback.xml
+            path: logback.xml
       restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }}
       imagePullSecrets:
       - name: "{{ include "common.namespace" . }}-docker-registry-key"