apiVersion: apps/v1
kind: Deployment
metadata:
  name: argo-workflows-workflow-controller
  namespace: "argo-workflows"
  labels:
    helm.sh/chart: argo-workflows-0.47.0
    app.kubernetes.io/name: argo-workflows-workflow-controller
    app.kubernetes.io/instance: argo-workflows
    app.kubernetes.io/component: workflow-controller
    app: workflow-controller
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/part-of: argo-workflows
    app.kubernetes.io/version: "v3.7.7"
spec:
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app.kubernetes.io/name: argo-workflows-workflow-controller
      app.kubernetes.io/instance: argo-workflows
  template:
    metadata:
      labels:
        helm.sh/chart: argo-workflows-0.47.0
        app.kubernetes.io/name: argo-workflows-workflow-controller
        app.kubernetes.io/instance: argo-workflows
        app.kubernetes.io/component: workflow-controller
        app: workflow-controller
        app.kubernetes.io/managed-by: Helm
        app.kubernetes.io/part-of: argo-workflows
        app.kubernetes.io/version: "v3.7.7"
    spec:
      serviceAccountName: argo-workflows-workflow-controller
      containers:
        - name: controller
          image: "quay.io/argoproj/workflow-controller:v3.7.7"
          imagePullPolicy: Always
          command: ["workflow-controller"]
          args:
            - "--configmap"
            - "argo-workflows-workflow-controller-configmap"
            - "--executor-image"
            - "quay.io/argoproj/argoexec:v3.7.7"
            - "--loglevel"
            - "info"
            - "--gloglevel"
            - "0"
            - "--log-format"
            - "text"
            - "--workflow-workers"
            - "2"
            - "--workflow-ttl-workers"
            - "1"
            - "--pod-cleanup-workers"
            - "1"
            - "--cron-workflow-workers"
            - "1"
          securityContext:
            allowPrivilegeEscalation: false
            capabilities:
              drop:
                - ALL
            readOnlyRootFilesystem: true
            runAsNonRoot: true
          env:
            - name: ARGO_NAMESPACE
              valueFrom:
                fieldRef:
                  apiVersion: v1
                  fieldPath: metadata.namespace
            - name: LEADER_ELECTION_IDENTITY
              valueFrom:
                fieldRef:
                  apiVersion: v1
                  fieldPath: metadata.name
            - name: LEADER_ELECTION_DISABLE
              value: "true"
          resources:
            requests:
              cpu: 10m
              memory: 128Mi
          ports:
            - name: metrics
              containerPort: 9090
            - containerPort: 6060
          livenessProbe:
            failureThreshold: 3
            httpGet:
              path: /healthz
              port: 6060
            initialDelaySeconds: 90
            periodSeconds: 60
            timeoutSeconds: 30
      nodeSelector:
        kubernetes.io/os: linux
