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 28, 2021
1 parent 17398dd commit 6c684d2
Showing 1 changed file with 5 additions and 1 deletion.
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

0 comments on commit 6c684d2

Please sign in to comment.