moving certs and keys to k8s secrets
[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: /opt/app/sparky/config/
29           name: aai-sparky-be-config
30         - mountPath: /opt/app/sparky/config/auth/client-cert-onap.p12 
31           name: aai-sparky-be-client-cert
32         - mountPath: /opt/app/sparky/config/auth/aai-os-cert.p12
33           name: aai-sparky-be-aai-os-cert
34         - mountPath: /opt/app/sparky/config/auth/inventory-ui-keystore
35           name: aai-sparky-be-inventory-key
36         - mountPath: /logs/
37           name: aai-sparky-be-logs
38         ports:
39         - containerPort: 9517
40         readinessProbe:
41           tcpSocket:
42             port: 9517
43           initialDelaySeconds: 5
44           periodSeconds: 10
45       volumes:
46       - name: aai-sparky-be-config
47         hostPath:
48           path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/sparky-be/appconfig/"
49       - name: aai-sparky-be-logs
50         hostPath:
51           path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/sparky-be/logs/"
52       - name: aai-sparky-be-client-cert
53         secret:
54           secretName: secret-{{ .Values.nsPrefix }}-aai
55       - name: aai-sparky-be-aai-os-cert
56         secret:
57           secretName: secret-{{ .Values.nsPrefix }}-aai
58       - name: aai-sparky-be-inventory-key
59         secret:
60           secretName: secret-{{ .Values.nsPrefix }}-aai
61       restartPolicy: Always
62       imagePullSecrets:
63       - name: "{{ .Values.nsPrefix }}-docker-registry-key"