@@ -28,13 +28,13 @@ import (
2828 . "github.com/onsi/gomega"
2929 "k8s.io/apimachinery/pkg/types"
3030 "k8s.io/utils/ptr"
31- clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1 "
31+ clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2 "
3232
3333 infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1"
3434)
3535
3636type AKSAzureClusterAutoscalerSettingsSpecInput struct {
37- Cluster * clusterv1beta1 .Cluster
37+ Cluster * clusterv1 .Cluster
3838 WaitIntervals []interface {}
3939}
4040
@@ -54,7 +54,7 @@ func AKSAzureClusterAutoscalerSettingsSpec(ctx context.Context, inputGetter func
5454 amcp := & infrav1.AzureManagedControlPlane {}
5555 Eventually (func (g Gomega ) {
5656 err = mgmtClient .Get (ctx , types.NamespacedName {
57- Namespace : input .Cluster .Spec . ControlPlaneRef . Namespace ,
57+ Namespace : input .Cluster .Namespace ,
5858 Name : input .Cluster .Spec .ControlPlaneRef .Name ,
5959 }, amcp )
6060 g .Expect (err ).NotTo (HaveOccurred ())
@@ -76,15 +76,15 @@ func AKSAzureClusterAutoscalerSettingsSpec(ctx context.Context, inputGetter func
7676
7777 amcp .Spec .AutoScalerProfile = nil
7878 err = mgmtClient .Get (ctx , types.NamespacedName {
79- Namespace : input .Cluster .Spec . ControlPlaneRef . Namespace ,
79+ Namespace : input .Cluster .Namespace ,
8080 Name : input .Cluster .Spec .ControlPlaneRef .Name ,
8181 }, amcp )
8282 g .Expect (err ).NotTo (HaveOccurred ())
8383 g .Expect (mgmtClient .Update (ctx , amcp )).To (Succeed ())
8484 }, input .WaitIntervals ... ).Should (Succeed ())
8585 Eventually (func (g Gomega ) {
8686 err = mgmtClient .Get (ctx , types.NamespacedName {
87- Namespace : input .Cluster .Spec . ControlPlaneRef . Namespace ,
87+ Namespace : input .Cluster .Namespace ,
8888 Name : input .Cluster .Spec .ControlPlaneRef .Name ,
8989 }, amcp )
9090 g .Expect (err ).NotTo (HaveOccurred ())
@@ -94,7 +94,7 @@ func AKSAzureClusterAutoscalerSettingsSpec(ctx context.Context, inputGetter func
9494 // Now set to the new value
9595 Eventually (func (g Gomega ) {
9696 err = mgmtClient .Get (ctx , types.NamespacedName {
97- Namespace : input .Cluster .Spec . ControlPlaneRef . Namespace ,
97+ Namespace : input .Cluster .Namespace ,
9898 Name : input .Cluster .Spec .ControlPlaneRef .Name ,
9999 }, amcp )
100100 g .Expect (err ).NotTo (HaveOccurred ())
@@ -115,7 +115,7 @@ func AKSAzureClusterAutoscalerSettingsSpec(ctx context.Context, inputGetter func
115115
116116 Eventually (func (g Gomega ) {
117117 err = mgmtClient .Get (ctx , types.NamespacedName {
118- Namespace : input .Cluster .Spec . ControlPlaneRef . Namespace ,
118+ Namespace : input .Cluster .Namespace ,
119119 Name : input .Cluster .Spec .ControlPlaneRef .Name ,
120120 }, amcp )
121121 g .Expect (err ).NotTo (HaveOccurred ())
@@ -124,7 +124,7 @@ func AKSAzureClusterAutoscalerSettingsSpec(ctx context.Context, inputGetter func
124124 }, input .WaitIntervals ... ).Should (Succeed ())
125125 Eventually (func (g Gomega ) {
126126 err = mgmtClient .Get (ctx , types.NamespacedName {
127- Namespace : input .Cluster .Spec . ControlPlaneRef . Namespace ,
127+ Namespace : input .Cluster .Namespace ,
128128 Name : input .Cluster .Spec .ControlPlaneRef .Name ,
129129 }, amcp )
130130 g .Expect (err ).NotTo (HaveOccurred ())
0 commit comments