# This file describes the config settings available in the workflow controller configmap
apiVersion: v1
kind: ConfigMap
metadata:
  name: workflow-controller-configmap
data:
  config: |
    # instanceID is a label selector to limit the controller's watch to a specific instance. It
    # contains an arbitrary value that is carried forward into its pod labels, under the key
    # workflows.argoproj.io/controller-instanceid, for the purposes of workflow segregation. This
    # enables a controller to only receive workflow and pod events that it is interested about,
    # in order to support multiple controllers in a single cluster, and ultimately allows the
    # controller itself to be bundled as part of a higher level application. If omitted, the
    # controller watches workflows and pods that *are not* labeled with an instance id.
    instanceID: my-ci-controller

    # namespace limits the controller's watch/queries to a specific namespace. This allows the
    # controller to run with namespace scope (role), instead of cluster scope (clusterrole).
    namespace: argo

    # artifactRepository defines the default location to be used as the artifact repository for
    # container artifacts.
    artifactRepository:
      # archiveLogs will archive the main container logs as an artifact
      archiveLogs: true

      s3:
        # Use the corresponding endpoint depending on your S3 provider:
        #   AWS: s3.amazonaws.com
        #   GCS: storage.googleapis.com
        #   Minio: my-minio-endpoint.default:9000
        endpoint: s3.amazonaws.com
        bucket: my-bucket
        region: us-west-2
        # keyFormat is a format pattern to define how artifacts will be organized in a bucket.
        # It can reference workflow metadata variables such as workflow.namespace, workflow.name, 
        # pod.name. Can also use strftime formating of workflow.creationTimestamp so that workflow
        # artifacts can be organized by date. If omitted, will use `{{workflow.name}}/{{pod.name}}`,
        # which has potential for have collisions.
        # The following example pattern organizes workflow artifacts under a "my-artifacts" sub dir,
        # then sub dirs for year, month, date and finally workflow name and pod.
        # e.g.: my-artifacts/2018/08/23/my-workflow-abc123/my-workflow-abc123-1234567890
        keyFormat: "my-artifacts\
          /{{workflow.creationTimestamp.Y}}\
          /{{workflow.creationTimestamp.m}}\
          /{{workflow.creationTimestamp.d}}\
          /{{workflow.name}}\
          /{{pod.name}}"
        # insecure will disable TLS. used for minio installs not configured with TLS
        insecure: false
        # The actual secret object (in this example my-s3-credentials), should be created in every
        # namespace which a workflow wants which wants to store its artifacts to S3. If omitted,
        # attempts to use IAM role to access the bucket (instead of accessKey/secretKey).
        accessKeySecret:
          name: my-s3-credentials
          key: accessKey
        secretKeySecret:
          name: my-s3-credentials
          key: secretKey

    # Specifies the container runtime interface to use (default: docker)
    containerRuntimeExecutor: docker

    # kubelet port when using kubelet executor (default: 10250)
    kubeletPort: 10250

    # disable the TLS verification of the kubelet executo (default: false)
    kubeletInsecure: false

    # executorResources specifies the resource requirements that will be used for the executor
    # sidecar/init container. This is useful in clusters which require resources to be specified as
    # part of admission control.
    executorResources:
      requests:
        cpu: 0.1
        memory: 64Mi
      limits:
        cpu: 0.5
        memory: 512Mi

    # metricsConfig controls the path and port for prometheus metrics
    metricsConfig:
      enabled: true
      path: /metrics
      port: 8080

    # telemetryConfig controls the path and port for prometheus telemetry
    telemetryConfig:
      enabled: true
      path: /telemetry
      port: 8080
