Skip to content

Commit 4eaf68b

Browse files
committed
Setting the cluster as a hub cluster.
We need this step in order to install the `manifestwork` and `clusterclaim` CRDs in the cluster. Without it, `operator-sdk` will still run and manage to do the upgrade but the installed operator will constantly fail due to missing CRDs in the cluster. This is not affecting the job correctness which is only supposed to test the upgrade but it will make thing much easier if it fails and we need to inspect the "real failing logs" and not the one generated because of missing CRDs. Signed-off-by: Yoni Bettan <[email protected]>
1 parent 4f98acd commit 4eaf68b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

ci/prow/operator-hub-upgrade

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,20 @@ make operator-sdk
2121
# ready
2222
timeout 3m bash -c 'until [ "$(kubectl -n olm get catalogsource/operatorhubio-catalog -o jsonpath={.status.connectionState.lastObservedState})" = "READY" ]; do sleep 5; done'
2323

24+
# Install the `clusteradm` command
25+
curl -LO https://raw.githubusercontent.com/open-cluster-management-io/clusteradm/v0.7.2/install.sh
26+
chmod +x install.sh
27+
./install.sh 0.7.2
28+
29+
# Init OCM in the cluster
30+
clusteradm init --wait
31+
kubectl wait --for=condition=Available -n open-cluster-management deployment/cluster-manager
32+
kubectl wait --for=condition=Available --timeout=2m -n open-cluster-management-hub \
33+
deployment/cluster-manager-placement-controller \
34+
deployment/cluster-manager-registration-controller \
35+
deployment/cluster-manager-registration-webhook \
36+
deployment/cluster-manager-work-webhook
37+
2438
# Deploy the current bundle
2539
kubectl -n olm patch svc/operatorhubio-catalog --type merge -p '{"spec":{"type": "NodePort"}}'
2640
catalog_url=$(minikube service operatorhubio-catalog -n olm --url | cut -d"/" -f3)

0 commit comments

Comments
 (0)