apiVersion: apps/v1beta2 kind: Deployment metadata: name: {{ include "transfersh.fullname" . }} labels: app.kubernetes.io/name: {{ include "transfersh.name" . }} helm.sh/chart: {{ include "transfersh.chart" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} spec: replicas: {{ .Values.replicaCount }} selector: matchLabels: app.kubernetes.io/name: {{ include "transfersh.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} template: metadata: labels: app.kubernetes.io/name: {{ include "transfersh.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} spec: {{- $keyRefSource := .Values.argValues.source.type -}} {{- $keyRefName := .Values.argValues.source.name -}} containers: - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} {{- range .Values.argValues.paramNames }} env: - name: {{ . | upper }} valueFrom: {{ $keyRefSource }}: name: {{ $keyRefName }} key: {{ . | upper }} {{- end }} args: [ {{- range .Values.argValues.paramNames }} {{ printf "%s%s" $.Values.argIdentifier . | quote}},{{ printf "%s%s%s" "$(" . ")" | upper | quote}},{{- end }} ] livenessProbe: httpGet: path: / port: {{ .Values.service.internalPort }} readinessProbe: httpGet: path: / port: {{ .Values.service.internalPort }} resources: {{ toYaml .Values.resources | indent 12 }} {{- with .Values.nodeSelector }} nodeSelector: {{ toYaml . | indent 8 }} {{- end }} {{- with .Values.affinity }} affinity: {{ toYaml . | indent 8 }} {{- end }} {{- with .Values.tolerations }} tolerations: {{ toYaml . | indent 8 }} {{- end }}