Merge "[CONSUL] Add limits to consul chart."
[oom.git] / kubernetes / pomba / charts / pomba-validation-service / templates / deployment.yaml
index 550223b..8c3cb66 100644 (file)
@@ -1,3 +1,4 @@
+{{/*
 # Copyright © 2017 Amdocs, Bell Canada
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -11,6 +12,7 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+*/}}
 
 apiVersion: extensions/v1beta1
 kind: Deployment
@@ -20,7 +22,7 @@ metadata:
   labels:
     app: {{ include "common.name" . }}
     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ .Release.Name }}
+    release: {{ include "common.release" . }}
     heritage: {{ .Release.Service }}
 spec:
   replicas: {{ .Values.replicaCount }}
@@ -28,7 +30,7 @@ spec:
     metadata:
       labels:
         app: {{ include "common.name" . }}
-        release: {{ .Release.Name }}
+        release: {{ include "common.release" . }}
     spec:
       containers:
         - name: {{ include "common.name" . }}
@@ -72,8 +74,10 @@ spec:
             name: config-auth
           - mountPath: {{ .Values.config.configTopicsDir }}/
             name: config-topics
+          - mountPath: {{ .Values.config.rulesDir }}/
+            name: rules
           resources:
-{{ toYaml .Values.resources | indent 12 }}
+{{ include "common.resources" . | indent 12 }}
         {{- if .Values.nodeSelector }}
         nodeSelector:
 {{ toYaml .Values.nodeSelector | indent 10 }}
@@ -83,14 +87,34 @@ spec:
 {{ toYaml .Values.affinity | indent 10 }}
         {{- end }}
 
+        # 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:
             path: /etc/localtime
+        - name: {{ include "common.fullname" . }}-filebeat-conf
+          configMap:
+            name: {{ include "common.release" . }}-pomba-filebeat-configmap
+        - name: {{ include "common.fullname" . }}-data-filebeat
+          emptyDir: {}
         - name: root-config-app-prop
           configMap:
             name: {{ include "common.fullname" . }}-root-config
             defaultMode: 0644
+        - name:  {{ include "common.fullname" . }}-logs
+          emptyDir: {}
         - name: properties
           configMap:
             name: {{ include "common.fullname" . }}-config-properties
@@ -102,6 +126,8 @@ spec:
               path: validation-service-auth.properties
             - key: rule-indexing.properties
               path: rule-indexing.properties
+            - key: rule-data-dictionary.properties
+              path: rule-data-dictionary.properties
             - key: aai-environment.properties
               path: aai-environment.properties
             - key: schemaIngest.properties
@@ -125,5 +151,12 @@ spec:
               path: topic-poa-audit-result.properties
             - key: topic-poa-rule-validation.properties
               path: topic-poa-rule-validation.properties
+        - name: rules
+          configMap:
+            name: {{ include "common.fullname" . }}-rules
+            defaultMode: 0644
+            items:
+            - key: default-rules.groovy
+              path: default-rules.groovy
       imagePullSecrets:
       - name: "{{ include "common.namespace" . }}-docker-registry-key"