BorislavG | 12b6158 | 2018-03-28 19:31:32 +0300 | [diff] [blame] | 1 | apiVersion: extensions/v1beta1 |
| 2 | kind: Deployment |
| 3 | metadata: |
| 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 }} |
| 11 | spec: |
| 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" . }} |
BorislavG | df11cd5 | 2018-05-06 12:55:20 +0000 | [diff] [blame] | 22 | image: "{{ include "common.repository" . }}/{{ .Values.image }}" |
BorislavG | 12b6158 | 2018-03-28 19:31:32 +0300 | [diff] [blame] | 23 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
Patrick Brady | 1a62b66 | 2018-05-30 10:56:46 -0700 | [diff] [blame] | 24 | command: |
| 25 | - /opt/startCdt.sh |
BorislavG | 12b6158 | 2018-03-28 19:31:32 +0300 | [diff] [blame] | 26 | 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 Brady | 1a62b66 | 2018-05-30 10:56:46 -0700 | [diff] [blame] | 44 | # This sets the port that CDT will use to connect to the main appc container. |
mayankg2703 | 41a6614 | 2018-06-06 07:53:35 +0000 | [diff] [blame^] | 45 | # 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 Brady | 1a62b66 | 2018-05-30 10:56:46 -0700 | [diff] [blame] | 47 | - name: CDT_PORT |
| 48 | value: "{{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.nodePort3 }}" |
BorislavG | 12b6158 | 2018-03-28 19:31:32 +0300 | [diff] [blame] | 49 | 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" |