Skip to content

Commit 75b5552

Browse files
authored
Merge pull request kubernetes#93034 from matthias50/matthias50/ensure-vmss-fix
Skip ensuring VMSS in pool for nodes which should be excluded from lb
2 parents 6a8129f + ee8f9f2 commit 75b5552

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)