Commit Graph

45 Commits (b0af0f68b102e37df474c4c21fa46935850f824b)

Author SHA1 Message Date
Pengfei Ni b9b6a9e98d Add verbose logs for azure cloud provider 2018-05-24 13:20:46 +08:00
Doug MacEachern e7cc5df3f6 Use cloudprovider.NotImplemented in AddSSHKeyToAllInstances
Minor cleanup: In looking at implementations of this method,
noticed a few providers created their own errors instead of using cloudprovider.NotImplemented
2018-04-27 13:19:06 -07:00
Jesse Haka de967b717d PR #59323, fix bug and remove one api call, add node util dependency to cloud controller 2018-04-22 20:32:26 +03:00
Pengfei Ni 8a287d2114 Fix machineID getting for vmss nodes when using instance metadata 2018-04-16 13:36:12 +08:00
Anup Navare 1335e6e2d4 Cleanup the use of ExternalID as it is deprecated
The patch removes ExternalID usage from node_controller
and node_lifecycle_oontroller. The code instead uses InstanceID
which returns the cloud provider ID as well.
2018-04-02 10:15:32 -07:00
Pengfei Ni 717fe5d0d6 Check whether it is running locally when UseInstanceMetadata 2018-03-09 11:09:33 +08:00
Pengfei Ni 68dcacf6e0 Fix instanceID for vmss nodes 2018-02-14 16:38:49 +08:00
Pengfei Ni 20de29ae6f Set instanceID to azure resource ID format while useInstanceMetadata is enabled 2018-02-08 15:12:36 +08:00
Pengfei Ni 4e4fde93a7 Add useInstanceMetadata param back in Azure cloud provider
This reverts commit bb1e797b28.
2018-02-08 12:40:35 +08:00
Walter Fender e18e8ec3c0 Add context to all relevant cloud APIs
This adds context to all the relevant cloud provider interface signatures.
Callers of those APIs are currently satisfied using context.TODO().
There will be follow on PRs to push the context through the stack.
For an idea of the full scope of this change please look at PR #58532.
2018-02-06 12:49:17 -08:00
Pengfei Ni 6c2c5c2614 Clean up unused functions and consts 2018-01-26 17:05:56 +08:00
Pengfei Ni bb1e797b28 Remove useInstanceMetadata param from Azure cloud provider 2017-12-27 16:20:54 +08:00
Pengfei Ni af5b079ef7 Initialize vmSet based on vmType setting and call vmSet interface instead of azureClient 2017-12-13 14:19:47 +08:00
Pengfei Ni 65c0738a82 Support getting instanceID, type and IP for vmss instances 2017-11-21 07:14:07 +00:00
Jingtao Ren ff961163aa clean up retry logic, since we try at least once 2017-11-20 09:32:47 -08:00
Jingtao Ren edfb2ad552 Azure load balancer general improvement 2017-11-20 09:32:46 -08:00
FengyunPan 462087fd74 Implement InstanceExistsByProviderID() for cloud providers
Fix #51406
If cloud providers(like aws, gce etc...) implement ExternalID()
and support getting instance by ProviderID , they also implement
InstanceExistsByProviderID().
2017-10-20 14:59:28 +08:00
Henrik Schmidt 1339e4cffc Use custom error for "unimplemented" 2017-09-26 09:21:53 +02:00
Dong Liu 09f0850da3 Fix InstanceTypeByProviderID for Azure 2017-08-30 13:00:21 +08:00
Josh Horwitz cf75c49883 change godoc based on feedback from luxas 2017-08-25 18:04:10 -04:00
Josh Horwitz 3528ceb27f address test & doc comments 2017-08-25 16:15:55 -04:00
Josh Horwitz 2f1ea47c83 Add InstanceExists* methods to cloud provider interface for CCM 2017-08-24 20:41:28 -04:00
Brendan Burns e03f02a575 metadata improvements. 2017-07-31 23:54:22 +00:00
Kubernetes Submit Queue 9b8bc25838 Merge pull request #49081 from brendandburns/imds
Automatic merge from submit-queue (batch tested with PRs 49081, 49318, 49219, 48989, 48486)

Fix instance metadata service URL.

Small fix @colemickens @jackfrancis
2017-07-28 04:03:36 -07:00
Kubernetes Submit Queue ea18935670 Merge pull request #45540 from edevil/azure_extra_logging
Automatic merge from submit-queue (batch tested with PRs 49083, 45540, 46862)

Add extra logging to azure API get calls

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

This PR adds extra logging for external calls to the Azure API, specifically get calls.

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

This will help troubleshoot problems arising from the usage of this cloudprovider. For example, it looks like #43516 is caused by a call to the cloudprovider taking too much time.
2017-07-19 21:18:25 -07:00
Brendan Burns 38b1b74f82 Fix up imds, also refactor for better testing. 2017-07-19 12:53:08 -07:00
André Cruz 4071a36c12 Add extra logging to azure API calls 2017-07-18 14:40:28 +01:00
Jack Francis f76ef29512 backing off az.getIPForMachine in az.NodeAddresses
also rate limiting the call to az.getVirtualMachine inside az.getIPForMachine
2017-07-14 17:13:40 -07:00
Brendan Burns 7644c6afc6 Add initial support for the Azure instance metadata service. 2017-07-06 06:56:39 -07:00
Chao Xu f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
Kubernetes Submit Queue 67730881a6 Merge pull request #46940 from realfake/azure-cloud-controller-manager
Automatic merge from submit-queue

Azure for cloud-controller-manager

**What this PR does / why we need it**:
This implements the NodeAddressesByProviderID and InstanceTypeByProviderID methods used by the cloud-controller-manager to the Azure provider.

**Release note**:

```release-note
NONE
```
Addresses #47257
2017-06-10 17:28:44 -07:00
Jack Francis 2accbbd618 go vet errata 2017-06-06 22:12:49 -07:00
Jack Francis 6d73a09dcc rate limiting everywhere
not waiting to rate limit until we get an error response from the API, doing so on initial request for all API requests
2017-06-06 22:09:57 -07:00
Jack Francis 148e923f65 az.getVirtualMachine already rate-limited
we don’t need to rate limit the calls _to_ it
2017-06-06 14:55:07 -07:00
Jack Francis ac931aa1e0 rate limiting on all azure sdk GET requests 2017-06-06 11:19:29 -07:00
Jack Francis 3f3aa279b9 configurable backoff
- leveraging Config struct (—cloud-config) to store backoff and rate limit on/off and performance configuration
- added add’l error logging
- enabled backoff for vm GET requests
2017-06-05 16:06:50 -07:00
realfake 7bc205fc59 Implement *ByProviderID methods 2017-06-05 22:56:09 +02:00
Cole Mickens 3fc0c05d83 azure: instances: remove dead code 2017-05-09 00:00:12 -07:00
wlan0 a68c783dc8 Use ProviderID to address nodes in the cloudprovider
The cloudprovider is being refactored out of kubernetes core. This is being
done by moving all the cloud-specific calls from kube-apiserver, kubelet and
kube-controller-manager into a separately maintained binary(by vendors) called
cloud-controller-manager. The Kubelet relies on the cloudprovider to detect information
about the node that it is running on. Some of the cloudproviders worked by
querying local information to obtain this information. In the new world of things,
local information cannot be relied on, since cloud-controller-manager will not
run on every node. Only one active instance of it will be run in the cluster.

Today, all calls to the cloudprovider are based on the nodename. Nodenames are
unqiue within the kubernetes cluster, but generally not unique within the cloud.
This model of addressing nodes by nodename will not work in the future because
local services cannot be queried to uniquely identify a node in the cloud. Therefore,
I propose that we perform all cloudprovider calls based on ProviderID. This ID is
a unique identifier for identifying a node on an external database (such as
the instanceID in aws cloud).
2017-03-27 23:13:13 -07:00
deads2k 6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Angus Lees 8a7e103191 providers: Remove long-deprecated Instances.List()
This method has been unused by k8s for some time, and yet is the last
piece of the cloud provider API that encourages provider names to be
human-friendly strings (this method applies a regex to instance names).

Actually removing this deprecated method is part of a long effort to
migrate from instance names to instance IDs in at least the OpenStack
provider plugin.
2016-12-10 22:36:12 +11:00
Brendan Burns a8c5c8123e Update azure cloud provider for new azure SDK 2016-12-08 21:36:00 -08:00
Chao Xu c962c2602a dependencies: pkg/cloudprovider 2016-11-23 15:53:09 -08:00
Justin Santa Barbara 54195d590f Use strongly-typed types.NodeName for a node name
We had another bug where we confused the hostname with the NodeName.

To avoid this happening again, and to make the code more
self-documenting, we use types.NodeName (a typedef alias for string)
whenever we are referring to the Node.Name.

A tedious but mechanical commit therefore, to change all uses of the
node name to use types.NodeName

Also clean up some of the (many) places where the NodeName is referred
to as a hostname (not true on AWS), or an instanceID (not true on GCE),
etc.
2016-09-27 10:47:31 -04:00
Cole Mickens 2ebffb431d implement azure cloudprovider 2016-07-26 14:50:33 -07:00