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
add metrics/slis to kube-proxy health checks #113057
add metrics/slis to kube-proxy health checks #113057
Conversation
@richabanker: This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The 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. |
Hi @richabanker. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
/ok-to-test |
@@ -86,6 +88,10 @@ import ( | |||
"k8s.io/utils/pointer" | |||
) | |||
|
|||
func init() { | |||
utilruntime.Must(metricsfeatures.AddFeatureGates(utilfeature.DefaultMutableFeatureGate)) |
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.
why is this needed?
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.
You need to register the feature gates before flags are applied, so conventionally this is done through an init function.
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.
are we not already setting them on line 247?
return utilfeature.DefaultMutableFeatureGate.SetFromMap(o.config.FeatureGates)
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 probably also try setting it the line before. But the init function is pretty standard way of setting this across the kubernetes code base.
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.
I was able to curl the /metrics/slis endpoint after commenting out the init() block- so functionally, its ok to be removed, but it makes sense to keep the init() block and follow the conventional way for initialization purposes.
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.
Your call @aojea 😃 we're open to either way, but I think we're slightly more inclined to follow convention.
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.
yeah, me too, I just wanted to fully understand it
Thanks for clarifying
/assign @aojea @logicalhan one naive question |
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
/approve
/approve clarified in #113057 (comment) |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aojea, logicalhan, Richabanker 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 |
/test pull-kubernetes-unit |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Adds health check SLI metrics to kube-proxy. This is behind a feature gate.
Which issue(s) this PR fixes:
Fixes #112959
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: