File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -444,6 +444,18 @@ run_kubectl_server_side_apply_tests() {
444
444
}
445
445
__EOF__
446
446
447
+ # Ensure the API server has recognized and started serving the associated CR API
448
+ local tries=5
449
+ for i in $( seq 1 $tries ) ; do
450
+ local output
451
+ output=$( kubectl " ${kube_flags[@]:? } " api-resources --api-group mygroup.example.com -oname)
452
+ if kube::test::if_has_string " $output " resources.mygroup.example.com; then
453
+ break
454
+ fi
455
+ echo " ${i} : Waiting for CR API to be available"
456
+ sleep " $i "
457
+ done
458
+
447
459
# Dry-run create the CR
448
460
kubectl " ${kube_flags[@]:? } " apply --server-side --dry-run=server -f hack/testdata/CRD/resource.yaml " ${kube_flags[@]:? } "
449
461
# Make sure that the CR doesn't exist
You can’t perform that action at this time.
0 commit comments