@@ -27,7 +27,7 @@ import (
27
27
appsv1 "k8s.io/api/apps/v1"
28
28
corev1 "k8s.io/api/core/v1"
29
29
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
30
- operatorv1alpha1 "sigs.k8s.io/cluster-api-operator/api/v1alpha1 "
30
+ operatorv1 "sigs.k8s.io/cluster-api-operator/api/v1alpha2 "
31
31
"sigs.k8s.io/cluster-api/test/framework"
32
32
33
33
"k8s.io/utils/ptr"
@@ -49,10 +49,12 @@ var _ = Describe("Create and delete a provider with manifests that don't fit the
49
49
50
50
It ("should successfully create a CoreProvider" , func () {
51
51
bootstrapCluster := bootstrapClusterProxy .GetClient ()
52
- coreProvider := & operatorv1alpha1.CoreProvider {ObjectMeta : metav1.ObjectMeta {
53
- Name : coreProviderName ,
54
- Namespace : operatorNamespace ,
55
- }}
52
+ coreProvider := & operatorv1.CoreProvider {
53
+ ObjectMeta : metav1.ObjectMeta {
54
+ Name : coreProviderName ,
55
+ Namespace : operatorNamespace ,
56
+ },
57
+ }
56
58
Expect (bootstrapCluster .Create (ctx , coreProvider )).To (Succeed ())
57
59
58
60
By ("Waiting for the core provider deployment to be ready" )
@@ -63,7 +65,7 @@ var _ = Describe("Create and delete a provider with manifests that don't fit the
63
65
64
66
By ("Waiting for core provider to be ready" )
65
67
WaitFor (ctx , For (coreProvider ).In (bootstrapCluster ).ToSatisfy (
66
- HaveStatusCondition (& coreProvider .Status .Conditions , operatorv1alpha1 .ProviderInstalledCondition ),
68
+ HaveStatusCondition (& coreProvider .Status .Conditions , operatorv1 .ProviderInstalledCondition ),
67
69
), e2eConfig .GetIntervals (bootstrapClusterProxy .GetName (), "wait-controllers" )... )
68
70
69
71
By ("Waiting for status.IntalledVersion to be set" )
@@ -74,13 +76,13 @@ var _ = Describe("Create and delete a provider with manifests that don't fit the
74
76
75
77
It ("should successfully create and delete an InfrastructureProvider for OCI" , func () {
76
78
bootstrapCluster := bootstrapClusterProxy .GetClient ()
77
- infraProvider := & operatorv1alpha1 .InfrastructureProvider {
79
+ infraProvider := & operatorv1 .InfrastructureProvider {
78
80
ObjectMeta : metav1.ObjectMeta {
79
81
Name : ociInfrastructureProviderName ,
80
82
Namespace : operatorNamespace ,
81
83
},
82
- Spec : operatorv1alpha1 .InfrastructureProviderSpec {
83
- ProviderSpec : operatorv1alpha1 .ProviderSpec {
84
+ Spec : operatorv1 .InfrastructureProviderSpec {
85
+ ProviderSpec : operatorv1 .ProviderSpec {
84
86
Version : ociInfrastructureProviderVersion ,
85
87
},
86
88
},
@@ -90,7 +92,7 @@ var _ = Describe("Create and delete a provider with manifests that don't fit the
90
92
91
93
By ("Waiting for the infrastructure provider to be ready" )
92
94
WaitFor (ctx , For (infraProvider ).In (bootstrapCluster ).ToSatisfy (
93
- HaveStatusCondition (& infraProvider .Status .Conditions , operatorv1alpha1 .ProviderInstalledCondition ),
95
+ HaveStatusCondition (& infraProvider .Status .Conditions , operatorv1 .ProviderInstalledCondition ),
94
96
), e2eConfig .GetIntervals (bootstrapClusterProxy .GetName (), "wait-controllers" )... )
95
97
96
98
By ("Waiting for status.IntalledVersion to be set" )
@@ -134,14 +136,14 @@ var _ = Describe("Create and delete a provider with manifests that don't fit the
134
136
135
137
It ("should successfully create and delete an InfrastructureProvider for OCI with custom name from a pre-created ConfigMap" , func () {
136
138
bootstrapCluster := bootstrapClusterProxy .GetClient ()
137
- infraProvider := & operatorv1alpha1 .InfrastructureProvider {
139
+ infraProvider := & operatorv1 .InfrastructureProvider {
138
140
ObjectMeta : metav1.ObjectMeta {
139
141
Name : ociInfrastructureProviderCustomName ,
140
142
Namespace : operatorNamespace ,
141
143
},
142
- Spec : operatorv1alpha1 .InfrastructureProviderSpec {
143
- ProviderSpec : operatorv1alpha1 .ProviderSpec {
144
- FetchConfig : & operatorv1alpha1 .FetchConfiguration {
144
+ Spec : operatorv1 .InfrastructureProviderSpec {
145
+ ProviderSpec : operatorv1 .ProviderSpec {
146
+ FetchConfig : & operatorv1 .FetchConfiguration {
145
147
Selector : & metav1.LabelSelector {
146
148
MatchLabels : map [string ]string {
147
149
"provider.cluster.x-k8s.io/name" : "oci" ,
@@ -163,7 +165,7 @@ var _ = Describe("Create and delete a provider with manifests that don't fit the
163
165
164
166
By ("Waiting for the infrastructure provider to be ready" )
165
167
WaitFor (ctx , For (infraProvider ).In (bootstrapCluster ).ToSatisfy (
166
- HaveStatusCondition (& infraProvider .Status .Conditions , operatorv1alpha1 .ProviderInstalledCondition )),
168
+ HaveStatusCondition (& infraProvider .Status .Conditions , operatorv1 .ProviderInstalledCondition )),
167
169
e2eConfig .GetIntervals (bootstrapClusterProxy .GetName (), "wait-controllers" )... )
168
170
169
171
By ("Waiting for status.IntalledVersion to be set" )
@@ -199,7 +201,7 @@ var _ = Describe("Create and delete a provider with manifests that don't fit the
199
201
200
202
It ("should successfully delete a CoreProvider" , func () {
201
203
bootstrapCluster := bootstrapClusterProxy .GetClient ()
202
- coreProvider := & operatorv1alpha1 .CoreProvider {ObjectMeta : metav1.ObjectMeta {
204
+ coreProvider := & operatorv1 .CoreProvider {ObjectMeta : metav1.ObjectMeta {
203
205
Name : coreProviderName ,
204
206
Namespace : operatorNamespace ,
205
207
}}
0 commit comments