-
Notifications
You must be signed in to change notification settings - Fork 56
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
Don't allow two DRPCs with conflicting selectors in the same namespace #1081
Don't allow two DRPCs with conflicting selectors in the same namespace #1081
Conversation
bfc6742
to
30ce48c
Compare
07f4b2e
to
cb4a719
Compare
@raghavendra-talur can you describe the problem you are trying to solve? Is there a bz that this PR is fixing? |
rmn "github.com/ramendr/ramen/api/v1alpha1" | ||
plrv1 "github.com/stolostron/multicloud-operators-placementrule/pkg/apis/apps/v1" | ||
) | ||
|
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.
Is this test related to overlapping selector? how?
shouldMatch: false, | ||
}, | ||
{ | ||
name: "Test with cache and not cache", |
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.
using "cache" is confusing, why not "value"?
}, | ||
shouldMatch: 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.
We can have obviously matching selector (e.g. key = value, key = value), but we can have some like:
drpc1: key1 = value1
drpc2: key2 = value2
This looks like valid selectors, but the user may add both labels to some PVC and this check cannot detect the issue.
What can work is to add an annotation to the PVC when we protect it with the name of the drpc (like placement). If a PVC is already protected by another drpc the new drpc should fail or report an error that some PVCs could not be handled due to conflict.
Signed-off-by: Raghavendra Talur <raghavendra.talur@gmail.com>
Signed-off-by: Raghavendra Talur <raghavendra.talur@gmail.com>
Signed-off-by: Raghavendra Talur <raghavendra.talur@gmail.com>
Signed-off-by: Raghavendra Talur <raghavendra.talur@gmail.com>
cb4a719
to
9b6a2fa
Compare
No description provided.