Skip to content
This repository has been archived by the owner on Apr 7, 2020. It is now read-only.

Commit

Permalink
Azure-CCM: Bundle cloudProviderRateLimitQPS[Write] to the maxNodes
Browse files Browse the repository at this point in the history
Ref: #532

```improvement operator
An issue where cloud controller manager was self-rate-limited for azure shoot clusters with more than 10 nodes has been fixed.
```
  • Loading branch information
vpnachev committed Jan 10, 2020
1 parent 3e842f9 commit aae3ee9
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ cloudProviderBackoffExponent: 1.5
cloudProviderBackoffDuration: 5
cloudProviderBackoffJitter: 1.0
cloudProviderRateLimit: true
cloudProviderRateLimitQPS: 10.0
cloudProviderRateLimitQPS: {{ ( max .Values.maxNodes 10 ) }}
cloudProviderRateLimitBucket: 100
cloudProviderRateLimitQPSWrite: 10.0
cloudProviderRateLimitQPSWrite: {{ ( max .Values.maxNodes 10 ) }}
cloudProviderRateLimitBucketWrite: 100
{{- if semverCompare ">= 1.14" .Values.kubernetesVersion }}
cloudProviderBackoffMode: v2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ vnetName: name
subnetName: sname
routeTableName: rtname
securityGroupName: sgname
region: location
region: location
maxNodes: 0
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,11 @@ func getConfigChartValues(
return nil, errors.Wrapf(err, "could not determine subnet, availability set, route table or security group name from infrastructureStatus of controlplane '%s'", util.ObjectName(cp))
}

var maxNodes int32
for _, worker := range cluster.Shoot.Spec.Provider.Workers {
maxNodes = maxNodes + worker.Maximum
}

// Collect config chart values.
values := map[string]interface{}{
"kubernetesVersion": cluster.Shoot.Spec.Kubernetes.Version,
Expand All @@ -226,6 +231,7 @@ func getConfigChartValues(
"routeTableName": routeTableName,
"securityGroupName": securityGroupName,
"region": cp.Spec.Region,
"maxNodes": maxNodes,
}

if infraStatus.Networks.VNet.ResourceGroup != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ import (
)

const (
namespace = "test"
namespace = "test"
maxNodes int32 = 0
)

var _ = Describe("ValuesProvider", func() {
Expand Down Expand Up @@ -450,6 +451,7 @@ var _ = Describe("ValuesProvider", func() {
"routeTableName": "route-table-name",
"securityGroupName": "security-group-name-workers",
"kubernetesVersion": "1.13.4",
"maxNodes": maxNodes,
}

configZonedClusterChartValues = map[string]interface{}{
Expand All @@ -464,6 +466,7 @@ var _ = Describe("ValuesProvider", func() {
"routeTableName": "route-table-name",
"securityGroupName": "security-group-name-workers",
"kubernetesVersion": "1.13.4",
"maxNodes": maxNodes,
}

ccmChartValues = map[string]interface{}{
Expand Down

0 comments on commit aae3ee9

Please sign in to comment.