apiVersion: apps/v1 kind: Deployment metadata: name: {{ .Release.Name }}-{{ .Values.controller.name}} labels: app: {{ .Release.Name }}-{{ .Values.controller.name}} chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} spec: replicas: {{ .Values.controller.replicas }} selector: matchLabels: app: {{ .Release.Name }}-{{ .Values.controller.name}} release: {{ .Release.Name }} template: metadata: labels: app: {{ .Release.Name }}-{{ .Values.controller.name}} release: {{ .Release.Name }} {{- if .Values.controller.podLabels }} {{ toYaml .Values.controller.podLabels | nindent 8}} {{- end }} {{- if .Values.controller.podAnnotations }} annotations: {{ toYaml .Values.controller.podAnnotations | indent 8}}{{- end }} spec: serviceAccountName: {{ .Values.controller.serviceAccount | quote }} containers: - name: controller image: "{{ .Values.images.namespace }}/{{ .Values.images.controller }}:{{ default .Values.images.tag .Values.controller.image.tag }}" imagePullPolicy: {{ .Values.images.pullPolicy }} command: [ "workflow-controller" ] args: - "--configmap" - "{{ .Release.Name }}-{{ .Values.controller.name}}-configmap" - "--executor-image" - "{{ .Values.images.namespace }}/{{ .Values.images.executor }}:{{ default .Values.images.tag .Values.executor.image.tag }}" - "--loglevel" - "{{ .Values.controller.logging.level }}" - "--gloglevel" - "{{ .Values.controller.logging.globallevel }}" env: - name: ARGO_NAMESPACE valueFrom: fieldRef: apiVersion: v1 fieldPath: metadata.namespace resources: {{- toYaml .Values.controller.resources | nindent 12 }} {{- if .Values.controller.metricsConfig.enabled }} ports: - containerPort: 8080 {{- end }} {{- with .Values.controller.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.controller.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.controller.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }}