|
| 1 | +{{- if .Values.enabled -}} |
| 2 | +apiVersion: apps/v1 |
| 3 | +kind: Deployment |
| 4 | +metadata: |
| 5 | + name: {{ include "sombra-job-scheduler.fullname" . }} |
| 6 | + namespace: {{ .Values.namespace }} |
| 7 | + labels: |
| 8 | + {{- include "sombra-job-scheduler.labels" . | nindent 4 }} |
| 9 | +spec: |
| 10 | + replicas: {{ .Values.replicaCount }} |
| 11 | + selector: |
| 12 | + matchLabels: |
| 13 | + {{- include "sombra-job-scheduler.selectorLabels" . | nindent 6 }} |
| 14 | + template: |
| 15 | + metadata: |
| 16 | + {{- with .Values.podAnnotations }} |
| 17 | + annotations: |
| 18 | + {{- toYaml . | nindent 8 }} |
| 19 | + {{- end }} |
| 20 | + labels: |
| 21 | + {{- include "sombra-job-scheduler.labels" . | nindent 8 }} |
| 22 | + {{- with .Values.podLabels }} |
| 23 | + {{- toYaml . | nindent 8 }} |
| 24 | + {{- end }} |
| 25 | + spec: |
| 26 | + {{- with .Values.global.imagePullSecrets }} |
| 27 | + imagePullSecrets: |
| 28 | + {{- toYaml . | nindent 8 }} |
| 29 | + {{- end }} |
| 30 | + {{- with .Values.podSecurityContext }} |
| 31 | + securityContext: |
| 32 | + {{- toYaml . | nindent 8 }} |
| 33 | + {{- end }} |
| 34 | + containers: |
| 35 | + - name: {{ .Chart.Name }} |
| 36 | + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" |
| 37 | + imagePullPolicy: {{ .Values.image.pullPolicy }} |
| 38 | + {{- with .Values.containerSecurityContext }} |
| 39 | + securityContext: |
| 40 | + {{- toYaml . | nindent 12 }} |
| 41 | + {{- end }} |
| 42 | + {{- if .Values.envFrom }} |
| 43 | + envFrom: |
| 44 | + {{- toYaml .Values.envFrom | nindent 12 }} |
| 45 | + {{- end }} |
| 46 | + env: |
| 47 | + {{- range $name, $value := .Values.envs }} |
| 48 | + - name: {{ $value.name }} |
| 49 | + value: {{ $value.value | quote }} |
| 50 | + {{- end }} |
| 51 | + livenessProbe: |
| 52 | + {{- toYaml .Values.livenessProbe | nindent 12 }} |
| 53 | + startupProbe: |
| 54 | + {{- toYaml .Values.startupProbe | nindent 12 }} |
| 55 | + resources: |
| 56 | + {{- toYaml .Values.resources | nindent 12 }} |
| 57 | + {{- with .Values.volumeMounts }} |
| 58 | + volumeMounts: |
| 59 | + {{- toYaml . | nindent 12 }} |
| 60 | + {{- end }} |
| 61 | + {{- with .Values.nodeSelector }} |
| 62 | + nodeSelector: |
| 63 | + {{- toYaml . | nindent 8 }} |
| 64 | + {{- end }} |
| 65 | + {{- with .Values.affinity }} |
| 66 | + affinity: |
| 67 | + {{- toYaml . | nindent 8 }} |
| 68 | + {{- end }} |
| 69 | + {{- with .Values.tolerations }} |
| 70 | + tolerations: |
| 71 | + {{- toYaml . | nindent 8 }} |
| 72 | + {{- end }} |
| 73 | + {{- with .Values.volumes }} |
| 74 | + volumes: |
| 75 | + {{- toYaml . | nindent 8 }} |
| 76 | + {{- end }} |
| 77 | +{{- end }} |
0 commit comments