Add a startup extension so main stops calling into pkg/enterprise - #5237
Open
caseydavenport wants to merge 1 commit into
Open
Add a startup extension so main stops calling into pkg/enterprise#5237caseydavenport wants to merge 1 commit into
caseydavenport wants to merge 1 commit into
Conversation
The variant's API checks, cluster state verification, protected namespaces, tenancy and cloud build flag now register through pkg/extensions, and the extensions arrive as a factory the operator calls once it resolves the variant.
caseydavenport
force-pushed
the
casey-operator-shim
branch
from
August 21, 2026 19:50
cfbbc6c to
27c2cf9
Compare
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.
Description
The operator's startup path calls into the Enterprise package directly for several things. Those go through the extensions boundary here instead, via a new startup slot that no-ops when nothing registers.
The extensions now arrive as a factory rather than a built registry, since the variant is not known until the operator has a client and has read the Installation. That leaves
cmd/main.gonaming a variant in exactly one place, the factory it starts with, which is what a variant's own entry point replaces.Behavior is unchanged with two exceptions worth calling out. The protected namespaces were already applied whatever the variant, so the startup extension registers for every variant and skips the checks that only apply to Enterprise. The version banner prints the build variant it was given rather than a hardcoded product name, so a cloud build reports "cloud"; the line the release tooling parses for the operator version is untouched.
Related: CORE-13420