Kubeadm: Move all constants to a single `const (`

Created on 11 Feb 2019  ·  4Comments  ·  Source: kubernetes/kubeadm

Move all const on file cmd/kubeadm/app/cmd/options/constant.go to a single const (

i.e:

- // APIServerAdvertiseAddress flag sets the IP address the API Server will advertise it's listening on. Specify '0.0.0.0' to use the address of the default network interface.
- const APIServerAdvertiseAddress = "apiserver-advertise-address"

- // APIServerBindPort flag sets the port for the API Server to bind to.
- const APIServerBindPort = "apiserver-bind-port"
+ const (
+    // APIServerAdvertiseAddress flag sets the IP address the API Server will advertise it's listening on. Specify '0.0.0.0' to use the address of the default network interface.
+    APIServerAdvertiseAddress = "apiserver-advertise-address"
+
+    // APIServerBindPort flag sets the port for the API Server to bind to.
+    const APIServerBindPort = "apiserver-bind-port"
+)

/kind cleanup
/priority backlog
/help
/good-first-issue

good first issue help wanted kincleanup lifecyclactive prioritbacklog

Most helpful comment

Hi @yagonobre, I would like to work on this issue.

Can you tell me how I can test this after I finish moving all constants into one const?

Thank you.

All 4 comments

@yagonobre:
This request has been marked as suitable for new contributors.

Please ensure the request meets the requirements listed here.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-good-first-issue command.

In response to this:

Move all const on file cmd/kubeadm/app/cmd/options/constant.go to a single const (

i.e:

- // APIServerAdvertiseAddress flag sets the IP address the API Server will advertise it's listening on. Specify '0.0.0.0' to use the address of the default network interface.
- const APIServerAdvertiseAddress = "apiserver-advertise-address"

- // APIServerBindPort flag sets the port for the API Server to bind to.
- const APIServerBindPort = "apiserver-bind-port"
+ const (
+    // APIServerAdvertiseAddress flag sets the IP address the API Server will advertise it's listening on. Specify '0.0.0.0' to use the address of the default network interface.
+    APIServerAdvertiseAddress = "apiserver-advertise-address"
+
+    // APIServerBindPort flag sets the port for the API Server to bind to.
+    const APIServerBindPort = "apiserver-bind-port"
+)

/kind cleanup
/priority backlog
/help
/good-first-issue

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.

markdown doesn't work for title :smile:

Hi @yagonobre, I would like to work on this issue.

Can you tell me how I can test this after I finish moving all constants into one const?

Thank you.

Thanks @rumshenoy,
you can run the tests ./build/run.sh make test WHAT=./cmd/kubeadm/app/cmd/, and try to build kubeadm ./build/run.sh make build kubeadm

/lifecycle active

Was this page helpful?
0 / 5 - 0 ratings