-
Notifications
You must be signed in to change notification settings - Fork 40.3k
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-port
to kube-proxy cmd flags.
#72682
Conversation
Hi @whypro. 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 |
@whypro Thanks for picking this up! Will take a look soon. Hopefully we can fix it for real this time. /sig network |
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
Tested locally and seems to work. Thanks for the fix.
/assign @thockin |
@@ -306,6 +311,20 @@ func (o *Options) applyDeprecatedHealthzPortToConfig() { | |||
o.config.HealthzBindAddress = fmt.Sprintf("%s:%d", o.config.HealthzBindAddress, o.healthzPort) | |||
} | |||
|
|||
func (o *Options) applyDeprecatedMetricsPortToConfig() { | |||
if o.metricsPort == 0 { |
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 don't understand this. It's a new flag, so the default will be 0. In that case we nuke the user's requested MetricsBindAddress ? Or is the default not 0?
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.
The default is set to ports.ProxyStatusPort
, which should be the same as before (10249).
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.
where is that defaulted?
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 see it now. Thanks!
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: MrHohn, thockin, whypro 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 |
…-upstream-release-1.12 Automated cherry pick of #72682: Add `metrics-port` to kube-proxy cmd flags.
…-upstream-release-1.13 Automated cherry pick of #72682: Add `metrics-port` to kube-proxy cmd flags.
…-upstream-release-1.11 Automated cherry pick of #72682: Add `metrics-port` to kube-proxy cmd flags.
This PR is essentially reverting kubernetes#11313. The underlying issue has been fixed in kubernetes/kubernetes#72682 and cherrypicked recently. Ref. kubernetes/kubernetes#75322
What type of PR is this?
/kind bug
What this PR does / why we need it:
Problems:
--healthz-bind-address
doesn't support IP+port (just support IP), but description says IP address and port--metrics-bind-address
Ref: #62582 (Thanks to @xiangpengzhao )
Add
metrics-port
to make two flag patterns (healthz server address and metrics server address) be consistent. Although these flags of kube-proxy is deprecated , we need to fix it because it still confuses some users.To enable the metrics server of kube-proxy by cmd flags, we can use:
Which issue(s) this PR fixes:
Fixes #62479
Special notes for your reviewer:
cc @xiangpengzhao @thockin
Does this PR introduce a user-facing change?: