mmis | 9cb5029 | 2018-09-19 00:31:35 +0100 | [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 | containers: |
| 20 | - name: {{ include "common.name" . }} |
Julien Barbot | 665fdc1 | 2018-10-22 16:49:07 +0200 | [diff] [blame] | 21 | image: "{{ include "common.repository" . }}/{{ .Values.image }}" |
mmis | 9cb5029 | 2018-09-19 00:31:35 +0100 | [diff] [blame] | 22 | 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 Khinda | 5e3f36a | 2018-09-24 15:25:42 +0000 | [diff] [blame] | 48 | {{ include "common.resources" . | indent 12 }} |
mmis | 9cb5029 | 2018-09-19 00:31:35 +0100 | [diff] [blame] | 49 | {{- 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" |