Commit Graph

76 Commits

Author SHA1 Message Date
Davanum Srinivas
43f523d405
Switch to sigs.k8s.io/yaml from ghodss/yaml
Change-Id: Ic72b5131bf441d159012d67a6a3d87088d0e6d31
2018-11-07 13:17:32 -05:00
Pengfei Ni
3cea6dc954 Improve Azure instance metadata handling 2018-10-29 13:05:03 +08:00
andrewsykim
2908174517 pass in stopCh to cloud provider Initialize method for custom controllers 2018-10-19 17:51:58 -04:00
Walter Fender
f3f46d5f5a Moving the cloudprovider interface to staging.
Individual implementations are not yet being moved.
Fixed all dependencies which call the interface.
Fixed golint exceptions to reflect the move.
Added project info as per @dims and
https://github.com/kubernetes/kubernetes-template-project.
Added dims to the security contacts.
Fixed minor issues.
Added missing template files.
Copied ControllerClientBuilder interface to cp.
This allows us to break the only dependency on K8s/K8s.
Added TODO to ControllerClientBuilder.
Fixed GoDeps.
Factored in feedback from JustinSB.
2018-10-04 14:41:20 -07:00
Pengfei Ni
de9c127c94 Add events for azure-cloud-provider
When errors occur on azure cloud provider, events now are added so that users
could easily find the underground errors on Azure API.
2018-09-14 10:41:19 +08:00
Pengfei Ni
919058b315 Compose routes for on-prem nodes
Compose faked routes for unmanaged nodes so that node controller would
assume the routes for them have already been created.
2018-08-29 14:28:30 +08:00
Kubernetes Submit Queue
91e37eeb92
Merge pull request #67772 from andyzhangx/azuredisk-volumelimits2
Automatic merge from submit-queue (batch tested with PRs 67766, 67642, 67772). 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>.

Enable dynamic azure disk volume limits

**What this PR does / why we need it**:
Enable dynamic azure disk volume limits,
This is an azure cloud provider implementation related to feature: [Dynamic Maximum volume count](https://github.com/kubernetes/features/issues/554)

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

**Special notes for your reviewer**:
This PR use `az.VirtualMachineSizesClient.List` to list all vm sizes under region, match vm size with current node size, and then got `MaxDataDiskCount`, the `GetVolumeLimits` happens in kubelet and will return `attachable-volumes-azure-disk` in node status as following example:
```
agentpool-22082114-0
    ...
    allocatable:
      attachable-volumes-azure-disk: "8"
      cpu: "2"
      ephemeral-storage: "28043041951"
      hugepages-1Gi: "0"
      hugepages-2Mi: "0"
      memory: 7034772Ki
      pods: "30"
```

**Release note**:

```
Enable dynamic azure disk volume limits
```

/sig azure
/kind feature
2018-08-27 06:14:17 -07:00
andyzhangx
dd63d407a4 Enable dynamic azure disk volume limits
use API to get max disk num

use continue when got exception

add logging

add cache and unit test

fix comments
2018-08-27 02:41:45 +00:00
Pengfei Ni
d499855ba2 Add caches for cross node resource groups and unmanaged nodes. 2018-08-20 23:21:03 +08:00
Pengfei Ni
028f155b9e Add node affinity for unzoned managed disks 2018-08-14 14:14:01 +08:00
Pengfei Ni
811e831b0a Chose availability zones from active nodes 2018-07-30 13:31:12 +08:00
Pengfei Ni
87c5883337 Implement GetLabelsForVolume for AzureDisk 2018-07-30 13:31:12 +08:00
Pengfei Ni
094dbded65 Add support of Azure standard load balancer and public IP 2018-03-30 16:52:36 +08:00
Pengfei Ni
b697251d9c Enable maximumLoadBalancerRuleCount config for azure yaml config file 2018-03-05 15:41:57 +08:00
Pengfei Ni
ff31ff1eaf Fix broken useManagedIdentityExtension for azure cloud provider 2018-03-05 15:37:25 +08:00
Pengfei Ni
ce8615dab6 Set default vmtype to standard if not set 2018-03-01 13:48:54 +08:00
Khaled Henidak(Kal)
f909859b6d fix json tag on Azure.config 2018-02-13 22:22:25 +00:00
Khaled Henidak(Kal)
a86062c259 Configuration changes 2018-02-13 20:56:53 +00:00
Khaled Henidak(Kal)
5bf6b0fd70 WIP - create read/writer rate limiter 2018-02-13 20:05:20 +00:00
Pengfei Ni
4d5e7b7cfb Use generic cache for vmss 2018-02-11 11:09:22 +08:00
Pengfei Ni
7634eacb4f Add error handling and new tests 2018-02-09 20:38:29 +08:00
Pengfei Ni
daec2bd745 Add cache for route tables 2018-02-09 09:09:25 +08:00
Pengfei Ni
21c8a63689 Add cache for network security groups 2018-02-09 09:09:25 +08:00
Pengfei Ni
d22b6d9ebe Add cache for load balancer 2018-02-09 09:09:25 +08:00
Pengfei Ni
2badf1ff55 Add cache for virtual machines 2018-02-09 09:09:25 +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
Pengfei Ni
6e453d7d31 Fix typo and comments 2018-01-31 10:55:41 +08:00
Kubernetes Submit Queue
8d9a9dcaf2
Merge pull request #58857 from brendandburns/ut3
Automatic merge from submit-queue (batch tested with PRs 57322, 57723, 58706, 59004, 58857). 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>.

Add more tests for Azure cloud provider.

<eom>
2018-01-29 20:11:44 -08:00
Brendan Burns
b23bdf787f Add more tests. 2018-01-29 20:50:36 +00:00
Pengfei Ni
6c2c5c2614 Clean up unused functions and consts 2018-01-26 17:05:56 +08:00
Pengfei Ni
c3a885353b Add azClientConfig to pass all essential information to create clients 2018-01-10 17:19:35 +08:00
Pengfei Ni
d2d48cddf8 Add wrappers for azure clients 2018-01-10 14:01:47 +08:00
Pengfei Ni
a69db7104d Do not set BaseURI again
BaseURI has been set by NewAccountsClientWithBaseURI method.
2018-01-06 07:56:10 +08:00
Pengfei Ni
fd16e37f44 Add generic interface for Azure clients 2018-01-05 11:44:22 +08:00
Dong Liu
7eafa215f5 Split auth related config for Azure 2018-01-03 10:23:26 +08:00
Kubernetes Submit Queue
aec4d16ba4
Merge pull request #57647 from feiskyer/metadata
Automatic merge from submit-queue. 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>.

Remove useInstanceMetadata param from Azure cloud provider

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

With out-of-tree Azure cloud provider (#50752), metadata won't work any more (kubelet won't call those metadata functions any more). 

This PR removes the parameter useInstanceMetadata from Azure cloud provider.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Remove useInstanceMetadata parameter from Azure cloud provider.
```
2017-12-29 04:24:07 -08:00
Pengfei Ni
bb1e797b28 Remove useInstanceMetadata param from Azure cloud provider 2017-12-27 16:20:54 +08:00
Pengfei Ni
c690ab8cd0 Fix typo of compute.VirtualMachinesClient 2017-12-27 13:40:33 +08:00
Pengfei Ni
068564a876 Add generic interface for VirtualMachineScaleSetsClient and VirtualMachineScaleSetVMsClient 2017-12-22 15:10:20 +08:00
Kubernetes Submit Queue
65a2367188
Merge pull request #57131 from feiskyer/azure-lb
Automatic merge from submit-queue (batch tested with PRs 57148, 57123, 57091, 57141, 57131). 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>.

Support LoadBalancer for Azure Virtual Machine Scale Sets

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

Continue of #43287, this PR adds LoadBalancer support for Azure Virtual Machine Scale Sets. To achieve this, this PR also

- Add a general VMSet interfaces for VMSS and VMAS, so that we won't add much if-else blocks for different logics
- Add scale sets implementation and availability sets implementation to VMSet
- Add vmSet property to Azure cloud provider and call vmSet instead of direct azure clients
- Add LoadBalancer support based vmSet


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

**Special notes for your reviewer**:

**Release note**:

```release-note
Support LoadBalancer for Azure Virtual Machine Scale Sets
```

/assign @brendandburns
2017-12-16 21:00:51 -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
65efeee64f Remove unused ScrubDNS interface from cloudprovider 2017-12-08 16:03:56 +08:00
Pengfei Ni
0f52220ed1 Add initial VMType (via vmType param) in azure cloud provider 2017-11-21 07:12:49 +00:00
Jingtao Ren
585dabc279 rename azure interfaces to conform with golang convention 2017-11-20 09:32:46 -08:00
Jingtao Ren
edfb2ad552 Azure load balancer general improvement 2017-11-20 09:32:46 -08:00
Ivan Towlson
14e134cec3 Rev Azure SDK to v11.1.1 2017-11-01 16:23:50 +13:00
Unknown
faecedb174 Fix format specifiers in Azure cloud provider 2017-08-31 15:54:36 +12:00
Robert Rati
926f070719 Make ClusterID required for AWS. #48954 2017-08-07 15:47:00 -04:00
Kubernetes Submit Queue
5a25527b9b Merge pull request #49725 from sylr/vnet
Automatic merge from submit-queue

Azure: Allow VNet to be in a separate Resource Group

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

This PR allows Kubernetes in an Azure context to use a VNet which is not in the same Resource Group as Kubernetes.

We need this because currently Azure Cloud Provider driver assumes that it should have a VNet for himself but if there is one thing that should be shared amongst Azure resources it's a VNet cause, well, things might want to talk to each other in a private network, don't you think ?

I guess this should we backported down to 1.6 branch.

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

fixes #49577

**Release note**:

```release-note
NONE
```

@kubernetes/sig-azure
@kubernetes/sig-azure-pr-reviews
2017-08-10 01:41:15 -07:00
Kubernetes Submit Queue
031a83082b Merge pull request #49283 from dixudx/fix_cloudprovider_azure_config
Automatic merge from submit-queue (batch tested with PRs 49642, 50335, 50390, 49283, 46582)

fix bug when azure cloud provider configuration file is not specified

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

Current [Azure cloud provider](https://github.com/kubernetes/kubernetes/blob/master/pkg/cloudprovider/providers/azure/azure.go#L203) failed to [parse empty config file](https://github.com/kubernetes/kubernetes/blob/master/pkg/cloudprovider/plugins.go#L110-L124) when `--cloud-config` is not specified.

[GetServicePrincipalToken](https://github.com/kubernetes/kubernetes/blob/master/pkg/cloudprovider/providers/azure/azure.go#L157-L199) will raise an error if no valid secrets/tokens are found. So we just need to return empty config obj if `--cloud-config` is not set.

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

**Special notes for your reviewer**:
@githubvick 

**Release note**:

```release-note
fix bug when azure cloud provider configuration file is not specified
```
2017-08-10 00:53:24 -07:00