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
Turn of metrics for reflectors created by watch managers #73624
Turn of metrics for reflectors created by watch managers #73624
Conversation
@wojtek-t: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. 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: wojtek-t 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 |
bb1aa97
to
033c89c
Compare
/hold |
// after this point, so that watch-based managers (if used) will not | ||
// blow the Kubelet memory usage if there are huge churn of secrets and/or | ||
// configmaps attached to pods running on this node. | ||
cache.SetReflectorMetricsProvider(manager.NoopMetricsProvider{}) |
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.
Actually it won't work, because SetReflectorMetricsProvider is using sync.Once underneath (so once initialized, we can't change it).
That said, I realized that I don't understand why this is happening, because the:
- metrics factory is defaulted to noop
- the prometheus metrics need to be explicitly linked and initialized (as they are in apiserver e.g.:
_ "k8s.io/kubernetes/pkg/util/reflector/prometheus" // for reflector metric registration
So I'm not sure what the exact problem actually is...
@wojtek-t: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
Fix #73587