From 34ffc875c3a165580e02cbfa0df2cc8da30d74a0 Mon Sep 17 00:00:00 2001 From: Anton Gilgur <4970083+agilgur5@users.noreply.github.com> Date: Mon, 24 Jul 2023 17:37:25 -0400 Subject: [PATCH] docs: add all remaining controller configurations (#11297) Signed-off-by: Anton Gilgur --- config/config.go | 9 +++--- config/retention_policy.go | 1 + docs/workflow-controller-configmap.yaml | 43 +++++++++++++++++++++++-- 3 files changed, 46 insertions(+), 7 deletions(-) diff --git a/config/config.go b/config/config.go index ec970f0286aa..2d1f7dd10d28 100644 --- a/config/config.go +++ b/config/config.go @@ -18,7 +18,7 @@ type ResourceRateLimit struct { Burst int `json:"burst"` } -// Config contain the configuration settings for the workflow controller +// Config contains the configuration settings for the workflow controller type Config struct { // NodeEvents configures how node events are emitted @@ -85,21 +85,22 @@ type Config struct { // Defaults to the Kubernetes default of 30 seconds. PodGCGracePeriodSeconds *int64 `json:"podGCGracePeriodSeconds,omitempty"` - // PodGCDeleteDelayDuration specifies the duration in seconds before the pods in the GC queue get deleted. - // Value must be non-negative integer. A zero value indicates that the pods will be deleted immediately. + // PodGCDeleteDelayDuration specifies the duration before pods in the GC queue get deleted. + // Value must be non-negative. A zero value indicates that the pods will be deleted immediately. // Defaults to 5 seconds. PodGCDeleteDelayDuration *metav1.Duration `json:"podGCDeleteDelayDuration,omitempty"` // WorkflowRestrictions restricts the controller to executing Workflows that meet certain restrictions WorkflowRestrictions *WorkflowRestrictions `json:"workflowRestrictions,omitempty"` - // Adding configurable initial delay (for K8S clusters with mutating webhooks) to prevent workflow getting modified by MWC. + // Adds configurable initial delay (for K8S clusters with mutating webhooks) to prevent workflow getting modified by MWC. InitialDelay metav1.Duration `json:"initialDelay,omitempty"` // The command/args for each image, needed when the command is not specified and the emissary executor is used. // https://argoproj.github.io/argo-workflows/workflow-executors/#emissary-emissary Images map[string]Image `json:"images,omitempty"` + // Workflow retention by number of workflows RetentionPolicy *RetentionPolicy `json:"retentionPolicy,omitempty"` // NavColor is an ui navigation bar background color diff --git a/config/retention_policy.go b/config/retention_policy.go index 564c082b0434..0b0c0cac15ba 100644 --- a/config/retention_policy.go +++ b/config/retention_policy.go @@ -1,5 +1,6 @@ package config +// Workflow retention by number of workflows type RetentionPolicy struct { Completed int `json:"completed,omitempty"` Failed int `json:"failed,omitempty"` diff --git a/docs/workflow-controller-configmap.yaml b/docs/workflow-controller-configmap.yaml index a1b9e5da0320..29ace4800526 100644 --- a/docs/workflow-controller-configmap.yaml +++ b/docs/workflow-controller-configmap.yaml @@ -13,9 +13,12 @@ data: # controller watches workflows and pods that *are not* labeled with an instance id. instanceID: my-ci-controller + # Namespace is a label selector filter to limit the controller's watch to a specific namespace + namespace: my-namespace + # Parallelism limits the max total parallel workflows that can execute at the same time # (available since Argo v2.3). Controller must be restarted to take effect. - parallelism: 10 + parallelism: "10" # Limit the maximum number of incomplete workflows in a namespace. # Intended for cluster installs that are multi-tenancy environments, to prevent too many workflows in one @@ -78,6 +81,16 @@ data: scope: workflow-list url: http://workflows?label=workflows.argoproj.io/completed=true + # Columns are custom columns that will be exposed in the Workflow List View. + columns: | + # Adds a column to the Workflow List View + - # The name of this column, e.g., "Workflow Completed". + name: Workflow Completed + # The type of this column, "label" or "annotation". + type: label + # The key of the label or annotation, e.g., "workflows.argoproj.io/completed". + key: workflows.argoproj.io/completed + # uncomment following lines if you want to change navigation bar background color # navColor: red @@ -180,11 +193,11 @@ data: # kubelet port when using kubelet executor (default: 10250) (kubelet executor will be deprecated use emissary instead) # (removed in v3.4) - kubeletPort: 10250 + kubeletPort: "10250" # disable the TLS verification of the kubelet executor (default: false) # (removed in v3.4) - kubeletInsecure: false + kubeletInsecure: "false" # The command/args for each image, needed when the command is not specified and the emissary executor is used. # https://argoproj.github.io/argo-workflows/workflow-executors/#emissary-emissary @@ -319,6 +332,30 @@ data: # name: argo-mysql-config # key: password + # PodSpecLogStrategy enables the logging of pod specs in the controller log. + # podSpecLogStrategy: | + # failedPod: true + # allPods: false + + # PodGCGracePeriodSeconds specifies the duration in seconds before a terminating pod is forcefully killed. + # Value must be non-negative integer. A zero value indicates that the pod will be forcefully terminated immediately. + # Defaults to the Kubernetes default of 30 seconds. + podGCGracePeriodSeconds: "60" + + # PodGCDeleteDelayDuration specifies the duration before pods in the GC queue get deleted. + # Value must be non-negative. A zero value indicates that the pods will be deleted immediately. + # Defaults to 5 seconds. + podGCDeleteDelayDuration: 30s + + # adds initial delay (for K8S clusters with mutating webhooks) to prevent workflow getting modified by MWC. + # initialDelay: 5s + + # Workflow retention by number of workflows + # retentionPolicy: | + # completed: 10 + # failed: 3 + # errored: 3 + # Default values that will apply to all Workflows from this controller, unless overridden on the Workflow-level # See more: docs/default-workflow-specs.md workflowDefaults: |