Merge pull request #54516 from dims/deprecate-using-cloud-provider-for-setting-host-address

Automatic merge from submit-queue (batch tested with PRs 53796, 54666, 54516, 54625, 54704). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Deprecate using cloud provider to set host address feature

**What this PR does / why we need it**:

Long term plan is to remove all uses of cloud provider from kube api
server. As part of that, we need to remove the dependency on
figuring out the host address of the node running the kube api server
using the cloud provider. In this review, we log a warning that this
feature that is usually used for example with swagger generation
will go away in the future.

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

Part of fix for 54077

**Special notes for your reviewer**:

**Release note**:

```release-note
If you are using the cloud provider API to determine the external host address of the apiserver, set --external-hostname explicitly instead. The cloud provider detection has been deprecated and will be removed in the future
```
pull/6/head
Kubernetes Submit Queue 2017-10-30 13:48:35 -07:00 committed by GitHub
commit d1d0b38c5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -81,6 +81,8 @@ func (s *CloudProviderOptions) DefaultExternalHost(genericoptions *genericoption
for _, addr := range addrs {
if addr.Type == v1.NodeExternalIP {
genericoptions.ExternalHost = addr.Address
glog.Warning("[Deprecated] Getting host address using cloud provider is " +
"now deprecated. Please use --external-hostname explicitly")
}
}
}