Skip to content

Commit 14ffafa

Browse files
authored
Merge pull request #3071 from k8s-infra-cherrypick-robot/cherry-pick-3063-to-release-1.7
[release-1.7] Fixing panic on AzureMachinePool creation with auto-scale
2 parents 3d7d507 + 8750716 commit 14ffafa

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

azure/scope/managedmachinepool.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,9 @@ func (s *ManagedMachinePoolScope) SetCAPIMachinePoolReplicas(replicas *int32) {
310310

311311
// SetCAPIMachinePoolAnnotation sets the specified annotation on the associated MachinePool.
312312
func (s *ManagedMachinePoolScope) SetCAPIMachinePoolAnnotation(key, value string) {
313+
if s.MachinePool.Annotations == nil {
314+
s.MachinePool.Annotations = make(map[string]string)
315+
}
313316
s.MachinePool.Annotations[key] = value
314317
}
315318

0 commit comments

Comments
 (0)