Skip to content

Commit 97debf1

Browse files
authored
Merge pull request #3063 from mjnovice/main
Fixing panic on AzureMachinePool creation with auto-scale
2 parents 25efd00 + 4e286d4 commit 97debf1

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
@@ -309,6 +309,9 @@ func (s *ManagedMachinePoolScope) SetCAPIMachinePoolReplicas(replicas *int32) {
309309

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

0 commit comments

Comments
 (0)