Skip to content

Commit ee8f9f2

Browse files
committed
Skip ensuring VMSS in pool for nodes which should be excluded from lb
Such nodes should not be added to backend pools. This has particular impact for nodes which are not master nodes (such as nodes running an etcd cluster) and are incorrectly added to the pool prior to this change.
1 parent 26f0227 commit ee8f9f2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

staging/src/k8s.io/legacy-cloud-providers/azure/azure_vmss.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -954,6 +954,12 @@ func (ss *scaleSet) ensureVMSSInPool(service *v1.Service, nodes []*v1.Node, back
954954
if ss.excludeMasterNodesFromStandardLB() && isMasterNode(node) {
955955
continue
956956
}
957+
958+
if ss.ShouldNodeExcludedFromLoadBalancer(node) {
959+
klog.V(4).Infof("Excluding unmanaged/external-resource-group node %q", node.Name)
960+
continue
961+
}
962+
957963
// in this scenario the vmSetName is an empty string and the name of vmss should be obtained from the provider IDs of nodes
958964
resourceGroupName, vmssName, err := getVmssAndResourceGroupNameByVMProviderID(node.Spec.ProviderID)
959965
if err != nil {

0 commit comments

Comments
 (0)