diff --git a/.spelling b/.spelling index 146c77176172..ae9c1ac6b8bc 100644 --- a/.spelling +++ b/.spelling @@ -41,6 +41,14 @@ ClusterRoleBinding CRD CRDs CloudSQL +ClusterRoleBinding +ClusterRoles +Codespaces +ConfigMap +ConfigMaps +Couler +CronWorkflow +CronWorkflows DataDog Dataflow DeleteObject diff --git a/docs/environment-variables.md b/docs/environment-variables.md index 6192ffc38f45..7c10ec5de0d5 100644 --- a/docs/environment-variables.md +++ b/docs/environment-variables.md @@ -53,6 +53,7 @@ most users. Environment variables may be removed at any time. | `WF_DEL_PROPAGATION_POLICY` | `string` | `""` | The deletion propagation policy for workflows. | | `WORKFLOW_GC_PERIOD` | `time.Duration` | `5m` | The periodicity for GC of workflows. | | `SEMAPHORE_NOTIFY_DELAY` | `time.Duration` | `1s` | Tuning Delay when notifying semaphore waiters about availability in the semaphore | +| `WATCH_CONTROLLER_SEMAPHORE_CONFIGMAPS` | `bool` | `true` | Whether to watch the Controller's ConfigMap and semaphore ConfigMaps for run-time changes. When disabled, the Controller will only read these ConfigMaps once and will have to be manually restarted to pick up new changes. | CLI parameters of the `argo-server` and `workflow-controller` can be specified as environment variables with the `ARGO_` prefix. For example: diff --git a/workflow/controller/controller.go b/workflow/controller/controller.go index 6451b4e9ce12..92928277a84f 100644 --- a/workflow/controller/controller.go +++ b/workflow/controller/controller.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "fmt" + "os" "strconv" gosync "sync" "syscall" @@ -299,7 +300,10 @@ func (wfc *WorkflowController) Run(ctx context.Context, wfWorkers, workflowTTLWo log.Fatal(err) } - go wfc.runConfigMapWatcher(ctx.Done()) + if os.Getenv("WATCH_CONTROLLER_SEMAPHORE_CONFIGMAPS") != "false" { + go wfc.runConfigMapWatcher(ctx.Done()) + } + go wfc.wfInformer.Run(ctx.Done()) go wfc.wftmplInformer.Informer().Run(ctx.Done()) go wfc.podInformer.Run(ctx.Done())