blob: 8ac5d3ed1fc4913d5395f3c8e0deb615e05a377e [file] [log] [blame]
BorislavG12b61582018-03-28 19:31:32 +03001apiVersion: 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 initContainers:
20 containers:
21 - name: {{ include "common.name" . }}
BorislavGdf11cd52018-05-06 12:55:20 +000022 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
BorislavG12b61582018-03-28 19:31:32 +030023 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
Patrick Brady1a62b662018-05-30 10:56:46 -070024 command:
25 - /opt/startCdt.sh
BorislavG12b61582018-03-28 19:31:32 +030026 ports:
27 - containerPort: {{ .Values.service.internalPort }}
28 name: {{ .Values.service.name }}
29 # disable liveness probe when breakpoints set in debugger
30 # so K8s doesn't restart unresponsive container
31 {{- if eq .Values.liveness.enabled true }}
32 livenessProbe:
33 tcpSocket:
34 port: {{ .Values.service.internalPort }}
35 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
36 periodSeconds: {{ .Values.liveness.periodSeconds }}
37 {{ end -}}
38 readinessProbe:
39 tcpSocket:
40 port: {{ .Values.service.internalPort }}
41 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
42 periodSeconds: {{ .Values.readiness.periodSeconds }}
43 env:
Patrick Brady1a62b662018-05-30 10:56:46 -070044 # This sets the port that CDT will use to connect to the main appc container.
mayankg270341a66142018-06-06 07:53:35 +000045 # The 11 is the node port suffix that is used in the main appc oom templates
46 # for nodePort3. This value will be configured in appc main chart in appc-cdt section.
Patrick Brady1a62b662018-05-30 10:56:46 -070047 - name: CDT_PORT
48 value: "{{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.nodePort3 }}"
BorislavG12b61582018-03-28 19:31:32 +030049 volumeMounts:
50 - mountPath: /etc/localtime
51 name: localtime
52 readOnly: true
53 resources:
54{{ toYaml .Values.resources | indent 12 }}
55 {{- if .Values.nodeSelector }}
56 nodeSelector:
57{{ toYaml .Values.nodeSelector | indent 10 }}
58 {{- end -}}
59 {{- if .Values.affinity }}
60 affinity:
61{{ toYaml .Values.affinity | indent 10 }}
62 {{- end }}
63 volumes:
64 - name: localtime
65 hostPath:
66 path: /etc/localtime
67 imagePullSecrets:
68 - name: "{{ include "common.namespace" . }}-docker-registry-key"