File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ package controllers
1919import (
2020 "context"
2121 "fmt"
22+ "strings"
2223
2324 "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute"
2425 "github.com/pkg/errors"
@@ -54,13 +55,20 @@ func newAzureManagedMachinePoolReconciler(scope *scope.ManagedControlPlaneScope)
5455// Reconcile reconciles all the services in pre determined order
5556func (r * azureManagedMachinePoolReconciler ) Reconcile (ctx context.Context , scope * scope.ManagedControlPlaneScope ) error {
5657 scope .Logger .Info ("reconciling machine pool" )
58+
59+ var normalizedVersion * string
60+ if scope .MachinePool .Spec .Template .Spec .Version != nil {
61+ v := strings .TrimPrefix (* scope .MachinePool .Spec .Template .Spec .Version , "v" )
62+ normalizedVersion = & v
63+ }
64+
5765 agentPoolSpec := & agentpools.Spec {
5866 Name : scope .InfraMachinePool .Name ,
5967 ResourceGroup : scope .ControlPlane .Spec .ResourceGroup ,
6068 Cluster : scope .ControlPlane .Name ,
6169 SKU : scope .InfraMachinePool .Spec .SKU ,
6270 Replicas : 1 ,
63- Version : scope . MachinePool . Spec . Template . Spec . Version ,
71+ Version : normalizedVersion ,
6472 }
6573
6674 if scope .InfraMachinePool .Spec .OSDiskSizeGB != nil {
You can’t perform that action at this time.
0 commit comments