Conversation
WorkloadDeployment names are moving to a truncated workload name plus a hash, so nothing may recover an ordinal or a deployment by splitting an instance name. Code now reads identity from labels and owner references. Key changes: - The stateful strategy reads each existing instance's ordinal from the instance-index label and uses the loop index for instances it builds. - Instances with a missing or invalid ordinal label, or a duplicate ordinal, are deleted ahead of other actions so a replacement can take the name. Previously a non-numeric suffix indexed the slice at -1. - New instances get their own copy of the template labels. The shared map let the last ordinal written overwrite every other instance's label, which only went unnoticed because ordering came from the name. - The CLI resolves an instance's deployment from the workload-deployment-name label or the WorkloadDeployment owner reference, and drops the name-splitting fallback.
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
Workload deployment names are about to become a short workload prefix plus a hash, so any code that reads meaning out of an instance name will break.
The controller took an instance's position from the digits at the end of its name, and the CLI found an instance's deployment by trimming those digits off. Both now read the position and the owning deployment from the labels and ownership the controller already records.
Instances with a missing or conflicting position label are now replaced instead of crashing the controller or silently shadowing another instance.
Test plan
Related to #367