Merge "OOM-1664 add annotation last-applied-configuration"
[oom.git] / kubernetes / pomba / charts / pomba-data-router / templates / deployment.yaml
index ce62679..71f3ac2 100644 (file)
@@ -35,6 +35,20 @@ spec:
       name: {{ include "common.name" . }}
     spec:
       initContainers:
+      - command:
+        - /root/ready.py
+        args:
+        - --container-name
+        - pomba-search-data
+        env:
+        - name: NAMESPACE
+          valueFrom:
+            fieldRef:
+              apiVersion: v1
+              fieldPath: metadata.namespace
+        image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        name: {{ include "common.name" . }}-readiness
       - command:
         - /bin/sh
         - -c
@@ -97,6 +111,8 @@ spec:
           name: {{ include "common.fullname" . }}-dynamic-policy
         - mountPath: /logs/
           name: {{ include "common.fullname" . }}-logs
+        resources:
+{{ include "common.resources" . | indent 10 }}
         ports:
         - containerPort: {{ .Values.service.internalPort }}
         {{- if eq .Values.liveness.enabled true }}
@@ -111,6 +127,20 @@ spec:
             port: {{ .Values.service.internalPort }}
           initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
           periodSeconds: {{ .Values.readiness.periodSeconds }}
+
+      # Filebeat sidecar container
+      - name: {{ include "common.name" . }}-filebeat-onap
+        image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        volumeMounts:
+        - name: {{ include "common.fullname" . }}-filebeat-conf
+          mountPath: /usr/share/filebeat/filebeat.yml
+          subPath: filebeat.yml
+        - name: {{ include "common.fullname" . }}-data-filebeat
+          mountPath: /usr/share/filebeat/data
+        - name: {{ include "common.fullname" . }}-logs
+          mountPath: /opt/app/logs
+
       volumes:
       - name: localtime
         hostPath:
@@ -126,6 +156,11 @@ spec:
             path: data-router.properties
           - key: schemaIngest.properties
             path: schemaIngest.properties
+      - name: {{ include "common.fullname" . }}-filebeat-conf
+        configMap:
+          name: {{ .Release.Name }}-pomba-filebeat-configmap
+      - name: {{ include "common.fullname" . }}-data-filebeat
+        emptyDir: {}
       - name: {{ include "common.fullname" . }}-dynamic-route
         configMap:
           name: {{ include "common.fullname" . }}-dynamic