Prepare to include cluster UID in CONTROLLER_IDENTITY to prevent cross-cluster conflicts#308
Merged
Prepare to include cluster UID in CONTROLLER_IDENTITY to prevent cross-cluster conflicts#308
Conversation
…ontroller-on-controller fighting
Controllers that previously set ManagerIdentity as "release/namespace" (pre-cluster-UID) or "temporal-worker-controller" (pre-Helm default) would be permanently blocked from managing existing Worker Deployments after upgrading, since shouldClaimManagerIdentity only triggered on empty identity. Now reclaims in both migration cases: - exact match on the old hardcoded default - new identity is a longer slash-prefixed version of the existing one Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… distinct test identity - defaults.ControllerIdentity is now DeprecatedDefaultControllerIdentity to make clear it exists only for upgrade migration detection, not as a live default - integration tests use a dedicated testControllerIdentity constant so they exercise the normal identity path rather than accidentally triggering the deprecated-identity migration branch Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
SetManagerIdentity with an empty identity clears the ManagerIdentity field on the Worker Deployment, leaving it ownerless. Add an explicit check and return an error rather than making the call. The startup check in main() is the primary enforcement; this is a targeted guard for the one call site where an empty value is actively dangerous. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
What was changed
In
shouldClaimManagerIdentity, detect future format of manager identityWhy?
To facilitate clean reclaim after rollback from the next release, which will include #309
Checklist
Closes
How was this tested:
Envtest won't test our get ns permissions, so just trusting there (we will test it in CI env because it runs on controller startup)
Any docs updates needed?