You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Include cluster UID in CONTROLLER_IDENTITY to prevent cross-cluster conflicts (#309)
Completes the two-release migration for including the cluster namespace
UID in the controller identity string.
Previously, the new `{identity}/{namespaceUID}` format was prepared
behind a "next release" comment while the bare `{identity}` string
remained active. This PR flips that: `getControllerIdentity()` now
returns the full `{identity}/{suffix}` format, and
`getDeprecatedControllerIdentity()` handles reclamation of Worker
Deployments previously claimed under the old format.
**Changes:**
- `getControllerIdentity()` now returns
`{CONTROLLER_IDENTITY}/{CONTROLLER_IDENTITY_SUFFIX}`; returns empty
string if either is unset
- `getDeprecatedControllerIdentity()` (renamed from
`getControllerIdentityWithNamespaceUID`) is used only for
backward-compatible reclamation
- Startup guard in `main()` fails fast if `CONTROLLER_IDENTITY` is unset
- Fallback guard in `Reconcile()` for library users who bypass `main()`
requires that `getControllerIdentity() != ""`
- Safety check in `claimManagerIdentity()` refuses to call
`SetManagerIdentity` with an empty string to prevent accidental field
clearing
- Renamed `ToBeDeprecatedDefaultControllerIdentity` →
`DeprecatedDefaultControllerIdentity`
- Updated tests to set both `IdentityEnvKey` and `IdentitySuffixEnvKey`
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
0 commit comments