Fix wrong filebeat config in aai
[oom.git] / kubernetes / aai / templates / aai-resources-deployment.yaml
1 #{{ if not .Values.disableAaiAaiResources }}
2 apiVersion: extensions/v1beta1
3 kind: Deployment
4 metadata:
5   name: aai-resources
6   namespace: "{{ .Values.nsPrefix }}-aai"
7 spec:
8   selector:
9     matchLabels:
10       app: aai-resources
11   template:
12     metadata:
13       labels:
14         app: aai-resources
15       name: aai-resources
16     spec:
17       initContainers:
18       - command:
19         - /root/ready.py
20         args:
21         - --container-name
22         - hbase
23         env:
24         - name: NAMESPACE
25           valueFrom:
26             fieldRef:
27               apiVersion: v1
28               fieldPath: metadata.namespace
29         image: {{ .Values.image.readiness }}
30         imagePullPolicy: {{ .Values.pullPolicy }}
31         name: aai-resources-readiness
32       containers:
33       - name: aai-resources
34         image: "{{ .Values.image.aaiResourcesImage }}:{{ .Values.image.aaiResourcesVersion}}"
35         imagePullPolicy: {{ .Values.pullPolicy }}
36         env:
37         - name: CHEF_BRANCH
38           value: master
39         - name: AAI_CHEF_ENV
40           value: simpledemo
41         - name: AAI_CORE_VERSION
42           value: 1.1.0-SNAPSHOT
43         - name: AAI_CHEF_LOC
44           value: /var/chef/aai-data/environments
45         - name: CHEF_GIT_URL
46           value: http://gerrit.onap.org/r/aai
47         - name: HBASE_STARTUP_ARTIFICIAL_DELAY
48           value: "60"
49         volumeMounts:
50         - mountPath: /etc/localtime
51           name: localtime
52           readOnly: true
53         - mountPath: /var/chef/aai-data/
54           name: aai-data
55         - mountPath: /var/log/onap
56           name: aai-resources-logs
57         - mountPath: /opt/app/aai-resources/bundleconfig/etc/logback.xml
58           name: aai-resources-log-conf
59           subPath: logback.xml
60         ports:
61         - containerPort: 8447
62         readinessProbe:
63           tcpSocket:
64             port: 8447
65           initialDelaySeconds: 5
66           periodSeconds: 10
67       - name: filebeat-onap-aai-resources
68         image: {{ .Values.image.filebeat }}
69         imagePullPolicy: {{ .Values.pullPolicy }}
70         volumeMounts:
71         - mountPath: /usr/share/filebeat/filebeat.yml
72           name: filebeat-conf
73         - mountPath: /var/log/onap
74           name: aai-resources-logs
75         - mountPath: /usr/share/filebeat/data
76           name: aai-resources-filebeat
77       volumes:
78       - name: localtime
79         hostPath:
80           path: /etc/localtime
81       - name: aai-data
82         hostPath:
83           path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/aai-data/"
84       - name: filebeat-conf
85         hostPath:
86           path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml
87       - name: aai-resources-logs
88         emptyDir: {}
89       - name: aai-resources-filebeat
90         emptyDir: {}
91       - name: aai-resources-log-conf
92         configMap:
93          name: aai-resources-configmap
94       restartPolicy: Always
95       imagePullSecrets:
96       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
97 ---
98 apiVersion: v1
99 kind: ConfigMap
100 metadata:
101   name: aai-resources-configmap
102   namespace: {{ .Values.nsPrefix }}-aai
103 data:
104 {{ (.Files.Glob "resources/resources/conf/logback.xml").AsConfig | indent 2 }}
105 #{{ end }}