Configuration reference see history edit this page

Talks about: , , and

The controller is configured entirely through command-line flags, grouped below by subsystem. When deployed via the Helm chart you never pass these directly — the chart sets them from your values and its own defaults; each section notes the Helm value that drives a flag, and the metio/helm-charts repo carries the full values reference. For the Helm values worth tuning and the reasoning behind each, see Production; for metrics and runbooks, Operations.

Manager and leader election

FlagDefaultDescriptionHelm value
--health-probe-bind-address:8081Address the liveness and readiness probe endpoints bind to.chart-managed
--leader-electfalseEnable controller-runtime leader election so only one replica reconciles at a time. Recommended for HA deployments.controller.leaderElect

The leader-election lease name is fixed at stageset-controller.stages.metio.wtf and is created in the namespace the controller pod runs in.

Watch scope

FlagDefaultDescriptionHelm value
--watch-namespaces(empty)Comma-separated list of namespaces the controller watches. Empty (the default) means cluster-wide. When set, the manager’s cache only observes StageSets and sources in these namespaces — the multi-tenant controller-instances pattern. Falls back to the STAGESET_WATCH_NAMESPACES environment variable when the flag is empty.controller.watchNamespaces

Environment variable: STAGESET_WATCH_NAMESPACES — comma-separated namespace list. When --watch-namespaces is non-empty the flag takes precedence. When restricted, the chart pivots RBAC to per-namespace RoleBindings instead of a cluster-wide ClusterRoleBinding.

Reconciliation defaults

FlagDefaultDescriptionHelm value
--default-interval10mReconcile cadence for StageSets that omit spec.interval.controller.defaultInterval
--inventory-modehybridInventory strategy for tracking applied resources: entries, hybrid, or applyset.controller.inventoryMode
--inventory-shard-cap5000Maximum number of resource entries per StageInventory shard.controller.inventoryShardCap
--no-cross-namespace-refsfalseDeny sourceRef and dependsOn references that target a different namespace.controller.noCrossNamespaceRefs
--allowed-action-hosts(empty)Host glob allowed for http actions; repeatable. Loopback and link-local ranges are always denied unless explicitly listed.controller.allowedActionHosts
--runbook-base-url(empty)URL prefix appended to actionable Ready condition messages as (runbook: <base>/<reason>/). Empty disables.controller.runbookBaseURL

Rollback store — filesystem

The rollback store preserves a copy of each stage’s last-applied artifact so that a rollback can re-apply the previous revision without re-fetching from the producer. The filesystem backend is appropriate for single-replica deployments or multi-replica deployments backed by an RWX volume.

--rollback-store-path and --rollback-store-s3-endpoint are mutually exclusive. Both empty disables the store; rollback falls back to re-fetching the producer artifact.

FlagDefaultDescriptionHelm value
--rollback-store-path(empty)Filesystem directory (e.g. an RWX PVC mount) for the rollback store. Empty disables the filesystem backend.rollbackStore.backend: pvc

The file store writes rendered output — including Secret data — in the clear. The volume must provide encryption at rest (encrypted StorageClass, LUKS, or cloud-disk encryption).

Rollback store — S3

Active when --rollback-store-s3-endpoint and --rollback-store-s3-bucket are both non-empty.

FlagDefaultDescriptionHelm value
--rollback-store-s3-endpoint(empty)S3-compatible endpoint (host:port, e.g. s3.amazonaws.com or minio.minio.svc:9000). Empty disables the S3 backend.rollbackStore.s3.endpoint
--rollback-store-s3-bucket(empty)S3 bucket for the rollback store. Must already exist.rollbackStore.s3.bucket
--rollback-store-s3-prefix(empty)Optional object-key prefix so the rollback store can coexist with other tenants in one bucket.rollbackStore.s3.prefix
--rollback-store-s3-region(empty)S3 region. Required for AWS multi-region buckets; ignored by most S3-compatible servers.rollbackStore.s3.region
--rollback-store-s3-use-ssltrueUse HTTPS to talk to the S3 endpoint. Set to false only for local MinIO over plain HTTP.rollbackStore.s3.useSSL
--rollback-store-s3-access-key(empty)Static access key. Empty engages minio-go’s IAM/IRSA credential discovery chain (env → web-identity → EC2/EKS metadata).rollbackStore.s3.existingSecret
--rollback-store-s3-secret-key(empty)Secret key, paired with --rollback-store-s3-access-key.rollbackStore.s3.existingSecret
--rollback-store-s3-session-token(empty)Optional session token for temporary credentials (e.g. IRSA).rollbackStore.s3.existingSecret
--rollback-store-s3-anonymousfalseSkip request signing. For public buckets only.rollbackStore.s3.anonymous
--rollback-store-s3-sses3Server-side encryption for stored objects: none, s3 (SSE-S3), or kms (SSE-KMS). The store holds rendered Secret data, so encryption is on by default. Set none only for a bucket whose backend cannot honor an SSE header.rollbackStore.s3.sse
--rollback-store-s3-sse-kms-key(empty)KMS key ARN or ID for --rollback-store-s3-sse=kms. Empty uses the bucket’s default KMS key.rollbackStore.s3.sseKmsKeyId

Metrics and health

FlagDefaultDescriptionHelm value
--metrics-bind-address:8080Address the controller-runtime Prometheus metrics endpoint binds to. "0" disables.chart-managed

The metrics endpoint exposes standard controller_runtime_* and workqueue_* series alongside the custom stageset_* metrics documented in Operations.

Webhook and TLS provisioning

The validating admission webhook for StageSet is enabled by default. Two TLS provisioning modes are supported.

FlagDefaultDescriptionHelm value
--enable-webhooktrueEnable the validating admission webhook for StageSet.chart-managed
--webhook-cert-modecert-managerTLS provisioning mode: cert-manager (chart renders a Certificate CR; cert is mounted from a Secret) or self-signed (the controller generates a CA and serving cert in-pod and patches the ValidatingWebhookConfiguration caBundle).webhook.certMode
--webhook-cert-dir/tmp/k8s-webhook-server/serving-certsDirectory holding tls.crt and tls.key for the webhook server.chart-managed
--webhook-port9443Port the validating webhook server binds to.chart-managed
--webhook-cert-validity8760h (1 year)Validity of the self-signed serving cert. The controller rotates it every validity/3.webhook.*
--webhook-service-namestageset-controller-webhookKubernetes Service the webhook is reachable through. Used to build cert SANs in self-signed mode.chart-managed
--webhook-service-namespace(empty)Namespace of the webhook Service. Empty falls back to the in-cluster ServiceAccount namespace.chart-managed
--webhook-validating-config-name(empty)Name of the ValidatingWebhookConfiguration whose caBundle the controller patches. Required when --webhook-cert-mode=self-signed.chart-managed

Gate endpoint

The gate endpoint exposes a read-only HTTP API for Flagger canary stage-gates. GET /gate/{namespace}/{stageset}/{stage} returns 200 when the named stage is ready to advance and 503 otherwise.

FlagDefaultDescriptionHelm value
--gate-bind-address:8082Address for the Flagger stage-gate endpoint. Empty disables the endpoint.gate.enabled

Logging

Logging is powered by the controller-runtime zap logger. The standard zap flags (--zap-log-level, --zap-encoder, --zap-stacktrace-level, --zap-time-encoding, and --zap-devel) are available and bound to flag.CommandLine; run stageset-controller --help to see their current defaults.