apiVersion: apps/v1
kind: Deployment
metadata:
  name: workflow-controller
spec:
  selector:
    matchLabels:
      app: workflow-controller
  template:
    metadata:
      labels:
        app: workflow-controller
    spec:
      serviceAccountName: argo
      containers:
        - name: workflow-controller
          image: argoproj/workflow-controller:latest
          securityContext:
            capabilities:
              drop:
                - ALL
          command:
            - workflow-controller
          args:
            - --configmap
            - workflow-controller-configmap
            - --executor-image
            - argoproj/argoexec:latest
          env:
            - name: LEADER_ELECTION_IDENTITY
              valueFrom:
                fieldRef:
                  apiVersion: v1
                  fieldPath: metadata.name
      securityContext:
        runAsNonRoot: true
      nodeSelector:
        kubernetes.io/os: linux
