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

Merged
merged 1 commit into from Jan 11, 2019

Conversation

@whypro
Copy link
Contributor

whypro commented Jan 8, 2019

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/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
  • so does --metrics-bind-address
  • we cannot specify metrics server port by cmd flags

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:

kube-proxy --metrics-bind-address=0.0.0.0 --metrics-port=10249

Which issue(s) this PR fixes:

Fixes #62479

Special notes for your reviewer:

cc @xiangpengzhao @thockin

Does this PR introduce a user-facing change?:

Add `metrics-port` to kube-proxy cmd flags.
@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Jan 8, 2019

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@cofyc

This comment has been minimized.

Copy link
Contributor

cofyc commented Jan 8, 2019

/ok-to-test

@MrHohn

This comment has been minimized.

Copy link
Member

MrHohn commented Jan 8, 2019

@whypro Thanks for picking this up! Will take a look soon. Hopefully we can fix it for real this time.

/sig network
/assign

@MrHohn

MrHohn approved these changes Jan 10, 2019

Copy link
Member

MrHohn left a comment

/lgtm
Tested locally and seems to work. Thanks for the fix.

@MrHohn

This comment has been minimized.

Copy link
Member

MrHohn commented Jan 10, 2019

/assign @thockin
for approval.

@@ -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 {

This comment has been minimized.

@thockin

thockin Jan 11, 2019

Member

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?

This comment has been minimized.

@MrHohn

MrHohn Jan 11, 2019

Member

The default is set to ports.ProxyStatusPort, which should be the same as before (10249).

This comment has been minimized.

@thockin

thockin Jan 11, 2019

Member

where is that defaulted?

This comment has been minimized.

@thockin

thockin Jan 11, 2019

Member

I see it now. Thanks!

@thockin

This comment has been minimized.

Copy link
Member

thockin commented Jan 11, 2019

/approve

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Jan 11, 2019

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit d313c3b into kubernetes:master Jan 11, 2019

19 checks passed

cla/linuxfoundation whypro authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-cross Skipped
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-100-performance Job succeeded.
Details
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-e2e-gke Skipped
pull-kubernetes-e2e-kops-aws Job succeeded.
Details
pull-kubernetes-e2e-kubeadm-gce Skipped
pull-kubernetes-godeps Skipped
pull-kubernetes-integration Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce-big Job succeeded.
Details
pull-kubernetes-local-e2e Skipped
pull-kubernetes-local-e2e-containerized Skipped
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details
tide In merge pool.
Details

k8s-ci-robot added a commit that referenced this pull request Feb 20, 2019

Merge pull request #72866 from whypro/automated-cherry-pick-of-#72682…
…-upstream-release-1.12

Automated cherry pick of #72682: Add `metrics-port` to kube-proxy cmd flags.

k8s-ci-robot added a commit that referenced this pull request Feb 21, 2019

Merge pull request #72865 from whypro/automated-cherry-pick-of-#72682…
…-upstream-release-1.13

Automated cherry pick of #72682: Add `metrics-port` to kube-proxy cmd flags.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment