Merge "Remove hardcoded kubernets IP"
[oom.git] / kubernetes / aai / templates / sparky-be-deployment.yaml
1 apiVersion: extensions/v1beta1
2 kind: Deployment
3 metadata:
4   name: sparky-be
5   namespace: "{{ .Values.nsPrefix }}-aai"
6 spec:
7   selector:
8     matchLabels:
9       app: sparky-be
10   template:
11     metadata:
12       labels:
13         app: sparky-be
14       name: sparky-be
15     spec:
16       containers:
17       - name: sparky-be
18         image: "{{ .Values.image.sparkyBeImage }}:{{ .Values.image.sparkyBeVersion }}"
19         imagePullPolicy: {{ .Values.pullPolicy }}
20         env:
21         - name: CONFIG_HOME
22           value: /opt/app/sparky/config/
23         - name: KEY_MANAGER_PASSWORD
24           value: OBF:1i9a1u2a1unz1lr61wn51wn11lss1unz1u301i6o
25         - name: KEY_STORE_PASSWORD
26           value: OBF:1i9a1u2a1unz1lr61wn51wn11lss1unz1u301i6o
27         volumeMounts:
28         - mountPath: /etc/localtime
29           name: localtime
30           readOnly: true
31         - mountPath: /opt/app/sparky/config/
32           name: aai-sparky-be-config
33         - mountPath: /var/log/onap
34           name: aai-sparky-be-logs
35         - mountPath: /opt/app/sparky/bundleconfig/etc/logback.xml
36           name: aai-sparky-be-log-conf
37           subPath: logback.xml
38         ports:
39         - containerPort: 9517
40         readinessProbe:
41           tcpSocket:
42             port: 9517
43           initialDelaySeconds: 5
44           periodSeconds: 10
45       - name: filebeat-onap-aai-sparky
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-sparky-be-logs
53         - mountPath: /usr/share/filebeat/data
54           name: aai-sparky-filebeat
55       volumes:
56       - name: localtime
57         hostPath:
58           path: /etc/localtime
59       - name: aai-sparky-be-config
60         hostPath:
61           path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/sparky-be/appconfig/"
62       - name: filebeat-conf
63         hostPath:
64           path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/log4j/filebeat.yml
65       - name: aai-sparky-be-logs
66         emptyDir: {}
67       - name: aai-sparky-filebeat
68         emptyDir: {}
69       - name: aai-sparky-be-log-conf
70         configMap:
71          name: aai-sparky-be-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-sparky-be-configmap
80   namespace: {{ .Values.nsPrefix }}-aai
81 data:
82 {{ (.Files.Glob "resources/sparky-be/conf/logback.xml").AsConfig | indent 2 }}
83