Skip to content
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

Fix the default KubeletReadOnlyPort value to 0 (disabled) #94551

Closed
wants to merge 1 commit into from
Closed

Fix the default KubeletReadOnlyPort value to 0 (disabled) #94551

wants to merge 1 commit into from

Conversation

warmchang
Copy link
Contributor

What type of PR is this?

/kind cleanup

What this PR does / why we need it:
"--read-only-port" field description (default 10255) is confusing, fix it.

Before:

 root@william  ~/go/src/k8s.io/kubernetes  _output/local/bin/linux/amd64/kubelet --help | grep read-only                                        ✔  ⚡  7962  15:42:18
      --read-only-port int32                                     The read-only port for the Kubelet to serve on with no authentication/authorization (set to 0 to disable) (default 10255) (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
 root@william  ~/go/src/k8s.io/kubernetes                                                                                                       ✔  ⚡  7963  15:42:25

After:

 root@william  ~/go/src/k8s.io/kubernetes  _output/local/bin/linux/amd64/kubelet --help | grep read-only                                        ✔  ⚡  7968  16:33:12
      --read-only-port int32                                     The read-only port for the Kubelet to serve on with no authentication/authorization (set to 0 to disable) (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
 root@william  ~/go/src/k8s.io/kubernetes                                                                                                       ✔  ⚡  7969  16:33:17

Which issue(s) this PR fixes:
Fixes #94550

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

N/A

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


Change-Id: I2b937764b6204a9ccf64446a0e57e7c58bc819e7
Signed-off-by: William Zhang <warmchang@outlook.com>
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Sep 5, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: warmchang
To complete the pull request process, please assign brendandburns
You can assign the PR to them by writing /assign @brendandburns in a comment when ready.

The full list of commands accepted by this bot can be found 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

@warmchang
Copy link
Contributor Author

/test pull-kubernetes-node-e2e

@k8s-ci-robot
Copy link
Contributor

@warmchang: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
pull-kubernetes-e2e-gce-ubuntu-containerd fda4f94 link /test pull-kubernetes-e2e-gce-ubuntu-containerd
pull-kubernetes-node-e2e fda4f94 link /test pull-kubernetes-node-e2e

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.

@liggitt
Copy link
Member

liggitt commented Sep 5, 2020

changing the constant to an invalid port is incorrect… if we want to disable by default, then we should modify the place where this value is set into the kubelet config

@liggitt
Copy link
Member

liggitt commented Sep 6, 2020

The CLI documentation is saying to set it to 0 to disable, and that the default is still 10255.

@warmchang
Copy link
Contributor Author

The default kubelet config value is 0 (disabled):

But the cli documentation said that the default is 10255.

@liggitt
Copy link
Member

liggitt commented Sep 8, 2020

But the cli documentation said that the default is 10255.

The CLI default is 10255, so the help is accurate. See https://github.com/kubernetes/kubernetes/blob/master/cmd/kubelet/app/options/options.go#L249-L252

When starting the kubelet from a config file, improved/stricter default values are used. See #59666

@warmchang
Copy link
Contributor Author

Got it, I seem to have pushed dominoes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"--read-only-port" field description is confusing.
3 participants