@@ -10,9 +10,12 @@ import (
10
10
"fmt"
11
11
12
12
. "github.com/onsi/ginkgo/v2"
13
+ . "github.com/onsi/gomega"
13
14
appsv1 "k8s.io/api/apps/v1"
14
15
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
16
+ "k8s.io/apimachinery/pkg/types"
15
17
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
18
+ addonsv1 "sigs.k8s.io/cluster-api/exp/addons/api/v1beta1"
16
19
"sigs.k8s.io/cluster-api/test/framework"
17
20
18
21
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/api/v1alpha1"
@@ -89,14 +92,24 @@ func waitForCalicoToBeReadyInWorkloadCluster(
89
92
) {
90
93
switch input .strategy {
91
94
case v1alpha1 .AddonStrategyClusterResourceSet :
92
- waitForClusterResourceSetToApplyResourcesInCluster (
95
+ crs := & addonsv1.ClusterResourceSet {}
96
+ Expect (input .clusterProxy .GetClient ().Get (
93
97
ctx ,
94
- waitForClusterResourceSetToApplyResourcesInClusterInput {
95
- name : "calico-cni-installation-" + input .workloadCluster .Name ,
96
- clusterProxy : input .clusterProxy ,
97
- cluster : input .workloadCluster ,
98
- intervals : input .clusterResourceSetIntervals ,
98
+ types.NamespacedName {
99
+ Name : "calico-cni-installation-" + input .workloadCluster .Name ,
100
+ Namespace : input .workloadCluster .Namespace ,
99
101
},
102
+ crs ,
103
+ )).To (Succeed ())
104
+
105
+ framework .WaitForClusterResourceSetToApplyResources (
106
+ ctx ,
107
+ framework.WaitForClusterResourceSetToApplyResourcesInput {
108
+ ClusterResourceSet : crs ,
109
+ ClusterProxy : input .clusterProxy ,
110
+ Cluster : input .workloadCluster ,
111
+ },
112
+ input .clusterResourceSetIntervals ... ,
100
113
)
101
114
case v1alpha1 .AddonStrategyHelmAddon :
102
115
WaitForHelmReleaseProxyReadyForCluster (
@@ -193,14 +206,24 @@ func waitForCiliumToBeReadyInWorkloadCluster(
193
206
) {
194
207
switch input .strategy {
195
208
case v1alpha1 .AddonStrategyClusterResourceSet :
196
- waitForClusterResourceSetToApplyResourcesInCluster (
209
+ crs := & addonsv1.ClusterResourceSet {}
210
+ Expect (input .clusterProxy .GetClient ().Get (
197
211
ctx ,
198
- waitForClusterResourceSetToApplyResourcesInClusterInput {
199
- name : "cilium-cni-installation-" + input .workloadCluster .Name ,
200
- clusterProxy : input .clusterProxy ,
201
- cluster : input .workloadCluster ,
202
- intervals : input .clusterResourceSetIntervals ,
212
+ types.NamespacedName {
213
+ Name : "cilium-cni-installation-" + input .workloadCluster .Name ,
214
+ Namespace : input .workloadCluster .Namespace ,
215
+ },
216
+ crs ,
217
+ )).To (Succeed ())
218
+
219
+ framework .WaitForClusterResourceSetToApplyResources (
220
+ ctx ,
221
+ framework.WaitForClusterResourceSetToApplyResourcesInput {
222
+ ClusterResourceSet : crs ,
223
+ ClusterProxy : input .clusterProxy ,
224
+ Cluster : input .workloadCluster ,
203
225
},
226
+ input .clusterResourceSetIntervals ... ,
204
227
)
205
228
case v1alpha1 .AddonStrategyHelmAddon :
206
229
WaitForHelmReleaseProxyReadyForCluster (
0 commit comments