-
Notifications
You must be signed in to change notification settings - Fork 69
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
[ACM-16286]: Ensure MCO spec addon options are propagated correctly #1718
[ACM-16286]: Ensure MCO spec addon options are propagated correctly #1718
Conversation
Signed-off-by: Saswata Mukherjee <[email protected]>
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.
/lgtm
/hold |
Signed-off-by: Saswata Mukherjee <[email protected]>
/retest |
Signed-off-by: Saswata Mukherjee <[email protected]>
Signed-off-by: Saswata Mukherjee <[email protected]>
Signed-off-by: Saswata Mukherjee <[email protected]>
Signed-off-by: Saswata Mukherjee <[email protected]>
Signed-off-by: Saswata Mukherjee <[email protected]>
Signed-off-by: Saswata Mukherjee <[email protected]>
Signed-off-by: Saswata Mukherjee <[email protected]>
Signed-off-by: Saswata Mukherjee <[email protected]>
/retest |
Signed-off-by: Saswata Mukherjee <[email protected]>
operators/multiclusterobservability/controllers/placementrule/manifestwork.go
Outdated
Show resolved
Hide resolved
operators/multiclusterobservability/controllers/placementrule/manifestwork.go
Outdated
Show resolved
Hide resolved
addon.Spec.Workers = found.Spec.Workers | ||
addon.Spec.Resources = found.Spec.Resources | ||
|
||
addon.Annotations[addonSourceAnnotation] = "override" |
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.
same comment as above? we wouldnt fall in here unless this k,v was already set?
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.
This is a new copy, but yeah we can just copy over from found.
operators/multiclusterobservability/controllers/placementrule/obsaddon.go
Outdated
Show resolved
Hide resolved
operators/multiclusterobservability/controllers/placementrule/obsaddon.go
Outdated
Show resolved
Hide resolved
operators/multiclusterobservability/controllers/placementrule/obsaddon.go
Outdated
Show resolved
Hide resolved
operators/multiclusterobservability/controllers/placementrule/placementrule_controller.go
Outdated
Show resolved
Hide resolved
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.
Looks good overall! It always surprises me that we discover those kind of bugs so late... Waiting for your replies
Signed-off-by: Saswata Mukherjee <[email protected]>
/retest |
1 similar comment
/retest |
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.
/lgtm
/retest |
Signed-off-by: Saswata Mukherjee <[email protected]>
/test test-e2e |
Signed-off-by: Saswata Mukherjee <[email protected]>
Quality Gate failedFailed conditions |
@saswatamcode: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
/hold cancel |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: coleenquadros, philipgough, saswatamcode, thibaultmg 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 |
8755dbd
into
stolostron:main
…tolostron#1718) * [ACM-16286]: Ensure MCO spec addon options are propagated correctly Signed-off-by: Saswata Mukherjee <[email protected]> * [ACM-16286]: Update all observabilityaddon manifests Signed-off-by: Saswata Mukherjee <[email protected]> * [ACM-16286]: Ensure hub and spoke obsaddon are synced based on spec Signed-off-by: Saswata Mukherjee <[email protected]> * [ACM-16286]: Allow customizing ObsAddon in spoke ns Signed-off-by: Saswata Mukherjee <[email protected]> * [ACM-16286]: Comments Signed-off-by: Saswata Mukherjee <[email protected]> * Add addon source annotation Signed-off-by: Saswata Mukherjee <[email protected]> * Add handling for empty map Signed-off-by: Saswata Mukherjee <[email protected]> * Add handling for nil maps Signed-off-by: Saswata Mukherjee <[email protected]> * Add annotation predicate, update in mco mode Signed-off-by: Saswata Mukherjee <[email protected]> * Fix unit test, make addon annotation constant Signed-off-by: Saswata Mukherjee <[email protected]> * Update comment Signed-off-by: Saswata Mukherjee <[email protected]> * Address comments Signed-off-by: Saswata Mukherjee <[email protected]> * Use semantic deepequal, add test for setter Signed-off-by: Saswata Mukherjee <[email protected]> * Set spoke addon correctly after comparison Signed-off-by: Saswata Mukherjee <[email protected]> --------- Signed-off-by: Saswata Mukherjee <[email protected]>
…1718) (#1725) * [ACM-16286]: Ensure MCO spec addon options are propagated correctly * [ACM-16286]: Update all observabilityaddon manifests * [ACM-16286]: Ensure hub and spoke obsaddon are synced based on spec * [ACM-16286]: Allow customizing ObsAddon in spoke ns * [ACM-16286]: Comments * Add addon source annotation * Add handling for empty map * Add handling for nil maps * Add annotation predicate, update in mco mode * Fix unit test, make addon annotation constant * Update comment * Address comments * Use semantic deepequal, add test for setter * Set spoke addon correctly after comparison --------- Signed-off-by: Saswata Mukherjee <[email protected]>
Turns out there are a few issues with the behavior of the ObservabilityAddon CRD.
The CRD should operationally be doing the following,
However it was not doing this correctly which led to a few issues and fields like the scrape limit or workers for metrics-collector just wouldn't work as well as couldn't be customized. So this PR addresses those issues. This PR,
observability.open-cluster-management.io/addon-source
during the creation of the ObservabilityAddon CR and maintain it for the lifecycle. It will have two accepted values "mco" and "override". When set to "mco" it will always reflect spec from MCO CR. If you try to change it, it will reconcile back to those values. When set to "override", we will not update the ObservabilityAddon CRD and will only use found values. This basically means user can set it to whatever they want, for a particular cluster