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

deprecate kube-apiserver flag --address --insecure-port #4356

Closed
wants to merge 1 commit into from

Conversation

hzxuzhonghu
Copy link
Member

@hzxuzhonghu hzxuzhonghu commented Jan 30, 2018

fix #4355

Stop supporting these flags since kubernetes 1.10.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 30, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: hzxuzhonghu
We suggest the following additional approver: justinsb

Assign the PR to them by writing /assign @justinsb 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 OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 30, 2018
@hzxuzhonghu
Copy link
Member Author

/assign @justinsb

@hzxuzhonghu
Copy link
Member Author

This is my first time make a commit to this project, and donnot know how to auto generate openapi.

@chrislovecnm
Copy link
Contributor

So we need to figure out how to deprecate this value instead of removing it. We probably want to validate the value is not included with deprecated k8s versions. validation.go and not remove from api. Mark as deprecated.

Open api is not used yet, but there is a make target and you can pr after this is merged.

@hzxuzhonghu
Copy link
Member Author

@chrislovecnm make sense, I have to look into the code.

@hzxuzhonghu hzxuzhonghu changed the title remove kube-apiserver flag --address deprecate kube-apiserver flag --address --insecure-port Jan 31, 2018
@hzxuzhonghu
Copy link
Member Author

I am not sure this is right, but I think it should be so.

@hzxuzhonghu
Copy link
Member Author

/retest

@k8s-ci-robot
Copy link
Contributor

@hzxuzhonghu: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-kops-e2e-kubernetes-aws e879f93 link /test pull-kops-e2e-kubernetes-aws

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.

// Address is the binding address for the kube api
Address string `json:"address,omitempty" flag:"address"`
// Deprecated: InsecurePort is the port the insecure api runs
InsecurePort int32 `json:"insecurePort,omitempty" flag:"insecure-port" flag-empty:"-1"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does 0 work as the flag-empty value?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First step, I want 0 to disable insecure http schema. So for <v1.10 it continue support 0.

// Deprecated: InsecurePort is the port the insecure api runs
InsecurePort int32 `json:"insecurePort,omitempty" flag:"insecure-port" flag-empty:"-1"`
// Deprecated: Address is the binding address for the kube api
Address string `json:"address,omitempty" flag:"address" flag-empty:"255.255.255.255"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly, can we keep empty-string as the flag-empty value? Just seems more intuitive to have the empty values be the default uninitialized values in go as well. Where that doesn't work is when 0 or "" is a valid flag value...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, "" is ok. I just am not familiar with this code, I thought it may has validation.

} else {
c.InsecurePort = 8080
// We disable the insecure port and address from 1.10 onwards
// https://github.com/kubernetes/kubernetes/issues/58951
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The blocker for this is kubernetes/kubernetes#43784 I believe

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, I c.

@justinsb
Copy link
Member

Blocked on kubernetes/kubernetes#43784

@justinsb justinsb added this to the 1.9 milestone Feb 21, 2018
@justinsb justinsb modified the milestones: 1.9.0, 1.9.1 Feb 28, 2018
@justinsb justinsb modified the milestones: 1.9.1, 1.10 May 26, 2018
@k8s-ci-robot
Copy link
Contributor

@hzxuzhonghu: PR needs rebase.

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.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 29, 2018
@justinsb
Copy link
Member

Thanks @hzxuzhonghu - I think I might have done some of this in #5234 (sorry, I was cleaning up and forgot your PR).

Do we still need this PR, do you think?

@justinsb justinsb modified the milestones: 1.10, 1.11 Jun 10, 2018
@hzxuzhonghu
Copy link
Member Author

@justinsb close this in favor of #5234

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. needs-changes needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Should stop using --address kube-apiserver flag
4 participants