-
Notifications
You must be signed in to change notification settings - Fork 19
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
Check and report on overlapping subs #247
Check and report on overlapping subs #247
Conversation
4ab97d1
to
39cbe96
Compare
|
||
var result []reconcile.Request | ||
|
||
for _, overlap := range pol.Status.OverlappingPolicies { |
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.
Would it be cleaner to have OverlappingPolicies
be a struct with the name and namespace field separated?
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.
Being able to use slices.Sort
, slices.Equal
and strings.Join
on them as they are right now is kind of nice. It wouldn't be too difficult to get those same kinds of things on a new struct, but I don't think we would gain much overall.
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.
A few minor comments but this looks great. Nice solution!
This adds two new status fields to OperatorPolicy, which are used to detect when two OperatorPolicies manage the same subscription. Overlapping OperatorPolicies will go into a non-compliant state, report the overlap, and will not compete with each other. Refs: - https://issues.redhat.com/browse/ACM-11616 Signed-off-by: Justin Kulikauskas <[email protected]>
39cbe96
to
0baae6e
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JustinKuli, mprahl The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
83540e0
into
open-cluster-management-io:main
This adds two new status fields to OperatorPolicy, which are used to detect when two OperatorPolicies manage the same subscription. Overlapping OperatorPolicies will go into a non-compliant state, report the overlap, and will not compete with each other.
Refs: