blob: d6a6d2110a5025573f1b97c452a8ef179a83d0a9 [file] [log] [blame]
mmis9cb50292018-09-19 00:31:35 +01001apiVersion: extensions/v1beta1
2kind: Deployment
3metadata:
4 name: {{ include "common.fullname" . }}
5 namespace: {{ include "common.namespace" . }}
6 labels:
7 app: {{ include "common.name" . }}
8 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
9 release: {{ .Release.Name }}
10 heritage: {{ .Release.Service }}
11spec:
12 replicas: {{ .Values.replicaCount }}
13 template:
14 metadata:
15 labels:
16 app: {{ include "common.name" . }}
17 release: {{ .Release.Name }}
18 spec:
19 containers:
20 - name: {{ include "common.name" . }}
Julien Barbot665fdc12018-10-22 16:49:07 +020021 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
mmis9cb50292018-09-19 00:31:35 +010022 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
23 command: ["/opt/app/policy/distribution/bin/policy-dist.sh"]
24 args: ["/opt/app/policy/distribution/etc/mounted/config.json"]
25 ports:
26 - containerPort: {{ .Values.service.internalPort }}
27 # disable liveness probe when breakpoints set in debugger
28 # so K8s doesn't restart unresponsive container
29 {{- if eq .Values.liveness.enabled true }}
30 livenessProbe:
31 tcpSocket:
32 port: {{ .Values.service.internalPort }}
33 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
34 periodSeconds: {{ .Values.liveness.periodSeconds }}
35 {{ end -}}
36 readinessProbe:
37 tcpSocket:
38 port: {{ .Values.service.internalPort }}
39 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
40 periodSeconds: {{ .Values.readiness.periodSeconds }}
41 volumeMounts:
42 - mountPath: /etc/localtime
43 name: localtime
44 readOnly: true
45 - mountPath: /opt/app/policy/distribution/etc/mounted
46 name: distributionconfig
47 resources:
Mandeep Khinda5e3f36a2018-09-24 15:25:42 +000048{{ include "common.resources" . | indent 12 }}
mmis9cb50292018-09-19 00:31:35 +010049 {{- if .Values.nodeSelector }}
50 nodeSelector:
51{{ toYaml .Values.nodeSelector | indent 10 }}
52 {{- end -}}
53 {{- if .Values.affinity }}
54 affinity:
55{{ toYaml .Values.affinity | indent 10 }}
56 {{- end }}
57 volumes:
58 - name: localtime
59 hostPath:
60 path: /etc/localtime
61 - name: distributionconfig
62 configMap:
63 name: {{ include "common.fullname" . }}-configmap
64 defaultMode: 0755
65 imagePullSecrets:
66 - name: "{{ include "common.namespace" . }}-docker-registry-key"