apiVersion: v1
kind: ConfigMap
metadata:
  name: workflow-controller-configmap
data:

  workflowDefaults: |
    metadata:
      labels:
        env: dev
        project: dc6
    spec:
      securityContext:
        runAsNonRoot: true
        runAsUser: 8737  #; Work as non-root user.
      activeDeadlineSeconds: 28800  #; Workflows must finish in 8 hours.
      ttlStrategy:
        secondsAfterCompletion: 1296000   #; Workflows delete after 15 days.
      podGC:
        strategy: OnPodCompletion
      serviceAccountName: workflows-default
      nodeSelector:
        dedicated: worker
      tolerations:
      - key: dedicated
        operator: "Equal"
        value: "worker"
        effect: "NoSchedule"
      - key: kubernetes.azure.com/scalesetpriority
        operator: "Equal"
        value: "spot"
        effect: "NoSchedule"

  containerRuntimeExecutor: emissary
  executor: |
    imagePullPolicy: IfNotPresent
    resources:
      requests:
        cpu: 100m
        memory: 64Mi
      limits:
        cpu: 500m
        memory: 1Gi

  artifactRepository: |
    archiveLogs: true
    s3:
      bucket: scratch
      endpoint: minio:9000
      insecure: true
      accessKeySecret:
        name: artifactrepocreds-secret
        key: accesskey
      secretKeySecret:
        name: artifactrepocreds-secret
        key: secretkey
      keyFormat: "{{workflow.name}}/{{pod.name}}"

  sso: |
    issuer: https://login.microsoftonline.com/e26d3ccf-6270-4235-94ec-857966b171c1/v2.0
    sessionExpiry: 10h
    clientId:
      name: client-id-secret
      key: client-id-key
    clientSecret:
      name: client-secret-secret
      key: client-secret-key
    redirectUrl: https://dc6argo.westeurope.cloudapp.azure.com/oauth2/callback
