cd7c3f8b24f624b5e969ad7b9dacbe62d896562f
[oom.git] / kubernetes / selfservice / templates / deployment.yaml
1 apiVersion: extensions/v1beta1
2 kind: Deployment
3 metadata:
4   labels:
5     app: {{ include "common.name" . }}
6     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
7     release: {{ .Release.Name }}
8     heritage: {{ .Release.Service }}
9   name: {{ include "common.fullname" . }}
10   namespace: {{ include "common.namespace" . }}
11 spec:
12   replicas: {{ .Values.replicaCount }}
13   template:
14     metadata:
15       annotations:
16         checksum.helm.kubernetes.io/configmap: {{ include (print $.Chart.Name "/templates/configmap.yaml") . | sha256sum }}
17       labels:
18         app: {{ include "common.name" . }}
19         release: {{ .Release.Name }}
20     spec:
21       containers:
22       - name: {{ include "common.name" . }}
23         image: "{{ .Values.global.selfserviceRepository }}/{{ .Values.image }}"
24         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
25         volumeMounts:
26         - mountPath: {{ .Values.deployerVolumePath }}/resources
27           name: initial-resources
28         - mountPath: {{ .Values.deployerVolumePath  }}/k8s
29           name: k8s-api-secret
30           readOnly: true
31         - mountPath: /var/log/aee/portal
32           name: {{ include "common.fullname" . }}-pvc-log
33         - mountPath: /var/AEE/hde
34           name: {{ include "common.fullname" . }}-pvc
35         ports:
36         - containerPort: {{ .Values.service.httpInternalPort }}
37         - containerPort: {{ .Values.service.debugInternalPort }}
38         - containerPort: {{ .Values.service.dbInternalPort }}
39         {{ if .Values.liveness.enabled }}
40         livenessProbe:
41           tcpSocket:
42             port: {{ .Values.service.httpInternalPort }}
43           initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
44           periodSeconds: {{ .Values.liveness.periodSeconds }}
45         {{ end }}
46         readinessProbe:
47           tcpSocket:
48             port: {{ .Values.service.httpInternalPort }}
49           initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
50           periodSeconds: {{ .Values.readiness.periodSeconds }}
51       volumes:
52       - name: k8s-api-secret
53         secret:
54           secretName: k8s-api-secret
55       - name: initial-resources
56         configMap:
57           name: {{ include "common.fullname" . }}-configmap
58       - name: {{ include "common.fullname" . }}-pvc-log
59         persistentVolumeClaim:
60           claimName: {{ include "common.fullname" . }}-log
61       - name: {{ include "common.fullname" . }}-pvc
62         persistentVolumeClaim:
63           claimName: {{ .Values.persistence.volumeMountName }}
64       restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }}
65       imagePullSecrets:
66       - name: "{{ include "common.namespace" . }}-ss-docker-registry-key"