-
Notifications
You must be signed in to change notification settings - Fork 48
AUTH-413: ps syncer: only sync labels if noone else is managing them #127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
openshift-merge-robot
merged 6 commits into
openshift:master
from
stlaz:psa_managed_fields
Aug 16, 2023
Merged
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
bf80f8c
ps syncer: only sync labels if noone else is managing them
stlaz f3b7734
ps syncer: own PSa labels previously owned by CPC
stlaz b49f55e
ps syncer: add unit tests
stlaz 5485d35
review comments + simplify isNSControlled() logic
stlaz df62a40
address comments
stlaz f5ce53d
ps syncer: don't mutate NS client cache between tests
stlaz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
ps syncer: own PSa labels previously owned by CPC
- Loading branch information
commit f3b77341f493abbcc5f3051c05a09a48580ec739
There are no files selected for viewing
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than do this, could we simply do an Apply with the
forceoption set to true?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not possible. The field is owned by "cluster-policy-controller + Update". You cannot set the label to an empty value (fails validation). That means that the only action you can do with it is to remove it. But I don't think there is a way to set up a
NamespaceApplyConfigurationthat would express that intention.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
huh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't you set it to the current value with a force?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you set it to the current value, the "force" does not seem to matter at all. You will always get double ownership, which will still result in a conflict when you're trying to change it. Some fun corner cases I tested:
cluster-policy-controller+ apply to the same valuea. the labels is now managed by
cluster-policy-controller + updateandcluster-policy-controller + applyb. you get the applyconfig and remove the ownership in an apply as the cluster-policy-controller
c. the field is now again owned only by
cluster-policy-controller + updatethis-controller+ apply the same valuea. the label is now managed by
cluster-policy-controller + updateandthis-controller + applyb. try to change the label value as this-controller - you get a conflict