Skip to content
Operator configuration

Operator configuration

Flags

FlagDefaultDescription
--default-resync-interval5mHow often to re-check each Prefect API resource against Prefect, unless the resource sets spec.interval.
--reconcile-timeout2mHow long one reconcile may run before its context is canceled and it is retried. 0 means no limit.
--cluster-domainThe DNS domain of the cluster, which the URLs of in-cluster Prefect servers end with. When empty, the operator reads it from the search domains in /etc/resolv.conf, and uses cluster.local if they do not include it.
--leader-electfalseElect a leader, so that only one replica reconciles. The release manifest and the chart set it. The lease is named fd9f6399.prefect.io.
--metrics-bind-address:8080The address of the Prometheus metrics endpoint.
--health-probe-bind-address:8081The address of /healthz and /readyz.
--enable-http2falseServe the metrics endpoint over HTTP/2.
--zap-log-levelinfodebug, info, error, or an integer above 0 for more verbose debug logs.
--zap-encoderjsonjson or console.

Environment variables

VariableDescription
WATCH_NAMESPACESA comma-separated list of namespaces to watch. When it’s unset, the operator watches all namespaces.

WATCH_NAMESPACES limits what the operator reconciles. It doesn’t limit its RBAC, which is a ClusterRole in both the release manifest and the chart.

Helm values

The chart sets the flags from these values:

ValueFlag
operator.defaultResyncInterval--default-resync-interval
operator.clusterDomain--cluster-domain
operator.logLevel--zap-log-level
operator.logFormat--zap-encoder

Set environment variables such as WATCH_NAMESPACES with operator.extraEnvVars:

operator:
  extraEnvVars:
    - name: WATCH_NAMESPACES
      value: data-eng,analytics

The chart README lists every value.

Without Helm

Edit the operator Deployment’s args and env in the release manifest before applying it, or patch it afterwards:

kubectl set env deployment/prefect-operator WATCH_NAMESPACES=data-eng,analytics