feat(controllers): add --controllers feature flag to enable/disable controllers per cluster#18
Merged
Merged
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds --controllers flag to cmd/main.go that accepts a comma-separated list of controller names (or "*" for all). Each controller block is wrapped in an enabled(...) guard, and valkeyClient creation is moved inside the namespace controller gate. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ction Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
nicacioliveira
previously approved these changes
May 28, 2026
hugo-ccabral
previously approved these changes
May 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ControllerNameconstant as its identifier--controllersflag (andcontrollers.enabledHelm value) controls which controllers start at runtime — default["*"]preserves existing behaviorparseControllersvalidates the list at startup; unknown names are fatal errorsif enabled(...)inmain.goDecofileReconcilerwatchingRevision.serving.knative.dev— setcontrollers.enabled: [decoredirect, operator-api]to disable decofile on hubUsage
Hub cluster (
infra_applications/hub/values.yaml):All controllers (default):
Invalid name → fatal error on startup:
Test Plan
make testpasseshelm template --set 'controllers.enabled[0]=decoredirect' --set 'controllers.enabled[1]=operator-api'renders--controllers=decoredirect,operator-apihelm template(default) renders no--controllersargcontrollers.enabled: [decoredirect, operator-api]— operator starts without Knative crash🤖 Generated with Claude Code
Summary by cubic
Adds a
--controllersruntime flag andcontrollers.enabledHelm value to turn controllers on/off per cluster. Default enables all; on the hub you can disabledecofileto avoid the Knative Revision crash.New Features
--controllers(comma-separated names or "*"); unknown names fail fast with a clear error.cmd/main.goare gated via enabled(...); Valkey init/watchers and metrics run only whentenantis enabled; webhooks only whendecofileis enabled.controllers.enabled; chart injects the flag only when not using ["*"]; parser tests added;hack/helm-generatorinjects the arg../cmdto include newcmd/controllers.go.Refactors
NamespaceReconcilertoTenantReconciler.ControllerNameconstants fortenant,decofile,deco,decoredirect, andoperator-api.Written for commit 84ca738. Summary will update on new commits.