Switch client and server to communicate over TLS
[oom/platform/cert-service.git] / certService / helm / aaf-cert-service / templates / deployment.yaml
1 apiVersion: apps/v1
2 kind: Deployment
3 metadata:
4   name: {{ .Chart.Name }}-deployment
5 spec:
6   selector:
7     matchLabels:
8       app: {{ .Values.appLabel }}
9   replicas: {{ .Values.replicaCount }}
10   template:
11     metadata:
12       labels:
13         app: {{ .Values.appLabel }}
14     spec:
15       volumes:
16       - name: {{ .Values.volume.name }}
17         secret:
18           secretName: {{ .Values.secret.name }}
19       - name: {{ .Values.tls.server.volume.name }}
20         secret:
21           secretName: {{ .Values.tls.server.secret.name }}
22       containers:
23       - name: aaf-cert-service
24         image: {{ .Values.repository }}/{{ .Values.image }}
25         imagePullPolicy: {{ .Values.pullPolicy }}
26         ports:
27         - containerPort: {{ .Values.containerPort }}
28         env:
29           - name: HTTPS_PORT
30             value: "{{ .Values.containerPort }}"
31           - name: KEYSTORE_PATH
32             value: "{{ .Values.tls.server.volume.mountPath }}/{{ .Values.envs.keystore.jksName }}"
33           - name: KEYSTORE_P12_PATH
34             value: "{{ .Values.tls.server.volume.mountPath }}/{{ .Values.envs.keystore.p12Name }}"
35           - name: TRUSTSTORE_PATH
36             value: "{{ .Values.tls.server.volume.mountPath }}/{{ .Values.envs.truststore.jksName }}"
37           - name: ROOT_CERT
38             value: "{{ .Values.tls.server.volume.mountPath }}/{{ .Values.envs.truststore.crtName }}"
39           - name: KEYSTORE_PASSWORD
40             value: "{{ .Values.envs.keystore.password }}"
41           - name: TRUSTSTORE_PASSWORD
42             value: "{{ .Values.envs.truststore.password }}"
43         livenessProbe:
44           exec:
45             command:
46               - /bin/bash
47               - -c
48               - {{ .Values.liveness.command }}
49             initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
50             periodSeconds: {{ .Values.liveness.periodSeconds }}
51         readinessProbe:
52           exec:
53             command:
54               - /bin/bash
55               - -c
56               - {{ .Values.readiness.command }}
57             initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
58             periodSeconds: {{ .Values.readiness.periodSeconds }}
59         volumeMounts:
60         - name: {{ .Values.volume.name }}
61           mountPath: {{ .Values.volume.mountPath }}
62           readOnly: true
63         - name: {{ .Values.tls.server.volume.name }}
64           mountPath: {{ .Values.tls.server.volume.mountPath }}
65           readOnly: true
66         resources:
67           {{ toYaml .Values.resources }}