Skip to content

Commit

Permalink
Azure: cloud provider config excludeMastersFromStandardLB -> false
Browse files Browse the repository at this point in the history
This updates the Azure cloud provider config to set
excludeMastersFromStandardLB to false. The default value is true, which
has not been a problem because the functionality was broken. With the
move to out-of-tree providers the functionality has been restored, in
which case if a master node restarts the service controller will not add
it back to the load balancer backend pool.
  • Loading branch information
patrickdillon committed Jul 29, 2021
1 parent 17398dd commit 79f2e2e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion pkg/asset/manifests/azure/cloudproviderconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ type CloudProviderConfig struct {
// managed resource names are matching the convention defined by capz
func (params CloudProviderConfig) JSON() (string, error) {

// Config requires type *bool for excludeMasterFromStandardLB, so define a variable here to get an address in the config.
excludeMasterFromStandardLB := false

config := config{
authConfig: authConfig{
Cloud: params.CloudName.Name(),
Expand Down Expand Up @@ -59,7 +62,8 @@ func (params CloudProviderConfig) JSON() (string, error) {
UseInstanceMetadata: true,
// default to standard load balancer, supports tcp resets on idle
// https://docs.microsoft.com/en-us/azure/load-balancer/load-balancer-tcp-reset
LoadBalancerSku: "standard",
LoadBalancerSku: "standard",
ExcludeMasterFromStandardLB: &excludeMasterFromStandardLB,
}

if params.ARO {
Expand Down
2 changes: 1 addition & 1 deletion pkg/asset/manifests/azure/cloudproviderconfig_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func TestCloudProviderConfig(t *testing.T) {
"cloudProviderRateLimitBucketWrite": 0,
"useInstanceMetadata": true,
"loadBalancerSku": "standard",
"excludeMasterFromStandardLB": null,
"excludeMasterFromStandardLB": false,
"disableOutboundSNAT": null,
"maximumLoadBalancerRuleCount": 0
}
Expand Down

0 comments on commit 79f2e2e

Please sign in to comment.