mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
Fix VMSS cache content
Using reference to a loop iterator variable is common mistake because it takes different values in each loop iteration.
This commit is contained in:
parent
a35f54e3e8
commit
ce3644ca59
@ -73,7 +73,8 @@ func (ss *scaleSet) newVMSSCache() (*azcache.TimedCache, error) {
|
||||
return nil, rerr.Error()
|
||||
}
|
||||
|
||||
for _, scaleSet := range allScaleSets {
|
||||
for i := range allScaleSets {
|
||||
scaleSet := allScaleSets[i]
|
||||
if scaleSet.Name == nil || *scaleSet.Name == "" {
|
||||
klog.Warning("failed to get the name of VMSS")
|
||||
continue
|
||||
|
Loading…
Reference in New Issue
Block a user