Skip to content

Commit 8750716

Browse files
mjnovicek8s-infra-cherrypick-robot
authored andcommitted
Fixing panic on AzureMachinePool creation with auto-scale
1 parent 3d7d507 commit 8750716

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)