Merge "Added initial deployment yamls for UUI"
[oom.git] / kubernetes / aai / templates / search-data-service-deployment.yaml
1 apiVersion: extensions/v1beta1
2 kind: Deployment
3 metadata:
4   name: search-data-service
5   namespace: "{{ .Values.nsPrefix }}-aai"
6 spec:
7   selector:
8     matchLabels:
9       app: search-data-service
10   template:
11     metadata:
12       labels:
13         app: search-data-service
14       name: search-data-service
15     spec:
16       containers:
17       - name: search-data-service
18         image: "{{ .Values.image.searchDataImage }}:{{ .Values.image.searchDataVersion }}"
19         imagePullPolicy: {{ .Values.pullPolicy }}
20         env:
21         - name: CONFIG_HOME
22           value: /opt/app/search-data-service/config/
23         - name: KEY_STORE_PASSWORD
24           value: OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10
25         - name: KEY_MANAGER_PASSWORD
26           value: OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10
27         volumeMounts:
28         - mountPath: /etc/localtime
29           name: localtime
30           readOnly: true
31         - mountPath: /opt/app/search-data-service/config/
32           name: aai-search-data-service-config
33         - mountPath: /var/log/onap
34           name: aai-search-data-service-logs
35         - mountPath: /opt/app/search-data-service/bundleconfig/etc/logback.xml
36           name: aai-search-data-service-log-conf
37           subPath: logback.xml
38         ports:
39         - containerPort: 9509
40         readinessProbe:
41           tcpSocket:
42             port: 9509
43           initialDelaySeconds: 5
44           periodSeconds: 10
45       - name: filebeat-onap-aai-search
46         image: {{ .Values.image.filebeat }}
47         imagePullPolicy: {{ .Values.pullPolicy }}
48         volumeMounts:
49         - mountPath: /usr/share/filebeat/filebeat.yml
50           name: filebeat-conf
51         - mountPath: /var/log/onap
52           name: aai-search-data-service-logs
53         - mountPath: /usr/share/filebeat/data
54           name: aai-search-data-service-filebeat
55       volumes:
56       - name: localtime
57         hostPath:
58           path: /etc/localtime
59       - name: aai-search-data-service-config
60         hostPath:
61           path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/search-data-service/appconfig/"
62       - name: filebeat-conf
63         hostPath:
64           path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/log4j/filebeat.yml
65       - name: aai-search-data-service-logs
66         emptyDir: {}
67       - name: aai-search-data-service-filebeat
68         emptyDir: {}
69       - name: aai-search-data-service-log-conf
70         configMap:
71          name: aai-search-data-service-configmap
72       restartPolicy: Always
73       imagePullSecrets:
74       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
75 ---
76 apiVersion: v1
77 kind: ConfigMap
78 metadata:
79   name: aai-search-data-service-configmap
80   namespace: {{ .Values.nsPrefix }}-aai
81 data:
82 {{ (.Files.Glob "resources/search-data-service/conf/logback.xml").AsConfig | indent 2 }}
83