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

Deprecation warnings for auto detecting cloud providers #51312

Merged
merged 1 commit into from
Aug 29, 2017

Conversation

andrewsykim
Copy link
Member

What this PR does / why we need it:
Adds deprecation warnings for auto detecting cloud providers. As part of the initiative for out-of-tree cloud providers, this feature is conflicting since we're shifting the dependency of kubernetes core into cAdvisor. In the future kubelets should be using --cloud-provider=external or no cloud provider at all.

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #50986

Special notes for your reviewer:
NOTE: I still have to coordinate with sig-node and kubernetes-dev to get approval for this deprecation, I'm only opening this PR since we're close to code freeze and it's something presentable.

Release note:

Deprecate auto detecting cloud providers in kubelet. Auto detecting cloud providers go against the initiative for out-of-tree cloud providers as we'll now depend on cAdvisor integrations with cloud providers instead of the core repo. In the near future, `--cloud-provider` for kubelet will either be an empty string or `external`. 

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Aug 25, 2017
@andrewsykim
Copy link
Member Author

/sig node

@k8s-ci-robot k8s-ci-robot added the sig/node Categorizes an issue or PR as relevant to SIG Node. label Aug 25, 2017
@k8s-github-robot k8s-github-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Aug 25, 2017
@andrewsykim
Copy link
Member Author

Copy link
Contributor

@mtaufen mtaufen left a comment

Choose a reason for hiding this comment

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

couple comments otherwise looks good

// with cloud providers instead of in the core repo.
// More details here: https://github.com/kubernetes/kubernetes/issues/50986
CloudProvider: v1alpha1.AutoDetectCloudProvider,
RootDirectory: v1alpha1.DefaultRootDir,
Copy link
Contributor

Choose a reason for hiding this comment

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

Might be better to move RootDirectory above the comment?

@@ -220,7 +224,7 @@ func (f *KubeletFlags) AddFlags(fs *pflag.FlagSet) {
fs.StringVar(&f.CertDirectory, "cert-dir", f.CertDirectory, "The directory where the TLS certs are located. "+
"If --tls-cert-file and --tls-private-key-file are provided, this flag will be ignored.")

fs.StringVar(&f.CloudProvider, "cloud-provider", f.CloudProvider, "The provider for cloud services. By default, kubelet will attempt to auto-detect the cloud provider. Specify empty string for running with no cloud provider.")
fs.StringVar(&f.CloudProvider, "cloud-provider", f.CloudProvider, "The provider for cloud services. By default, kubelet will attempt to auto-detect the cloud provider (deprecated). Specify empty string for running with no cloud provider, this will be the default in upcoming releases.")
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add a MarkDeprecated e.g. fs.MarkDeprecated("cloud-provider", "Specify empty string for running with no cloud provider, this will be the default in upcoming releases.")

And maybe make the StringVar doc string start with "Deprecated", so it's super-obvious.

Copy link
Member Author

Choose a reason for hiding this comment

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

@mtaufen Don't want users thinking we're deprecating the cloud-provider flag if we start the flag descrption with "DEPRECATED". Do you forsee that as a problem?

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh duh. I see your point, you aren't deprecating the entire flag.
Can we at least print a deprecation warning when people use the auto-detection feature?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup, I'll add that

@luxas
Copy link
Member

luxas commented Aug 25, 2017

PTAL @kubernetes/sig-node-pr-reviews @kubernetes/sig-cluster-lifecycle-pr-reviews

@wlan0 @andrewsykim Did any of you send out an email to kubernetes-dev?

@k8s-ci-robot k8s-ci-robot added the sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. label Aug 25, 2017
@luxas luxas added this to the v1.8 milestone Aug 25, 2017
@andrewsykim
Copy link
Member Author

@luxas will send the email out today, wanted to open the PR first so we have something concrete to show.

@andrewsykim
Copy link
Member Author

Email sent!

Copy link
Member

@luxas luxas left a comment

Choose a reason for hiding this comment

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

LGTM when @mtaufen's comments are addressed.

@andrewsykim
Copy link
Member Author

@mtaufen comments addressed

@andrewsykim
Copy link
Member Author

/test pull-kubernetes-e2e-gce-etcd3

@luxas
Copy link
Member

luxas commented Aug 26, 2017

cc @dims

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 26, 2017
Copy link
Member

@luxas luxas left a comment

Choose a reason for hiding this comment

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

Thanks @andrewsykim
/lgtm

@dims
Copy link
Member

dims commented Aug 26, 2017

@kubernetes/sig-node-pr-reviews

@mtaufen
Copy link
Contributor

mtaufen commented Aug 28, 2017

/lgtm

@yujuhong
Copy link
Contributor

/approve

@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 28, 2017
@vishh
Copy link
Contributor

vishh commented Aug 28, 2017

/approve

@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andrewsykim, luxas, mtaufen, vishh, yujuhong

Associated issue: 50986

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

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to @fejta).

Review the full test history for this PR.

@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 50932, 49610, 51312, 51415, 50705)

@k8s-github-robot k8s-github-robot merged commit 7c70dec into kubernetes:master Aug 29, 2017
dims added a commit to dims/kubernetes that referenced this pull request Dec 4, 2017
Following up on PR kubernetes#53573 and PR kubernetes#51312, Let's drop all code
related to auto-detection for v1.10.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. sig/node Categorizes an issue or PR as relevant to SIG Node. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove --cloud-provider=auto-detect
10 participants