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
unmanage labels for exporter ServiceMonitor #1099
unmanage labels for exporter ServiceMonitor #1099
Conversation
Create ServiceMonitor with default labels but do not reconcile on label updates. This allows users to add custom labels to ServiceMonitor which can be used by custom Prometheus instances for monitoring. Signed-off-by: Umanga Chapagain <chapagainumanga@gmail.com>
5710056
to
ccf71a5
Compare
/retest |
Ignore the previous comment I deleted. Given that the monitoring resources are fairly static, couldn't we just achieve this with a reconcile strategy of |
@jarrpa In any case, this PR is just a quick workaround to the current limitation. |
We could. But, we don't want to init and forget. We want to reconcile on spec changes only. |
Yes, the
Sure, and that should also be changed. We should be adding fields to the StorageCluster API to properly set and maintain any customization to the resources. Since this is a workaround that should be fixed properly at a future date, please insert a TODO comment and open a Jira issue to track that future change. |
@jarrpa There is already a Jira ticket for that as a story under the "ocs to ocs" epic |
Cool, so we just need the comment in the code. |
Do we need to add |
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.
Okay, after some offline discussion, it seems there is precedent for only reconciling a managed resource's spec. This seems bad, especially if the labels and/or annotations control functionality of how the operator interacts with the resource or even the behavior of the resource itself. But, given the precedent, I won't be too stubborn about this, we can change it later if anyone actually complains.
/lgtm
/cherrypick release-4.7 |
@jarrpa: once the present PR merges, I will cherry-pick it on top of release-4.7 in a new PR and assign it to you. In response to this:
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/test-infra repository. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jarrpa, nb-ohad 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 |
@jarrpa: new pull request created: #1106 In response to this:
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/test-infra repository. |
/cherrypick release-4.6 |
@umangachapagain: #1099 failed to apply on top of branch "release-4.6":
In response to this:
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/test-infra repository. |
Create ServiceMonitor with default labels but do not reconcile
on label updates. This allows users to add custom labels to
ServiceMonitor which can be used by custom Prometheus instances
for monitoring.
Signed-off-by: Umanga Chapagain chapagainumanga@gmail.com