Skip to content
This repository was archived by the owner on Aug 2, 2019. It is now read-only.

Commit e124f7b

Browse files
committed
Avoid race condition applying OLM manifests
1 parent 1bd29cc commit e124f7b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

etc/scripts/install.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ function wait_for_all_pods {
3030
timeout 300 "oc get pods -n $1 2>&1 | grep -v -E '(Running|Completed|STATUS)'"
3131
}
3232

33-
# initialize the minishift knative profile
34-
"$DIR/init-minishift-for-knative.sh"
35-
3633
# initialize local repos dir
3734
rm -rf "$REPO_DIR"
3835
mkdir -p "$REPO_DIR"
3936

37+
# initialize the minishift knative profile
38+
"$DIR/init-minishift-for-knative.sh"
39+
4040
# istio
4141
git clone https://github.com/minishift/minishift-addons "$REPO_DIR/minishift-addons"
4242
minishift addon install "$REPO_DIR/minishift-addons/add-ons/istio"
@@ -55,7 +55,9 @@ oc scale -n istio-system --replicas=0 statefulset/elasticsearch
5555

5656
# OLM
5757
git clone https://github.com/operator-framework/operator-lifecycle-manager "$REPO_DIR/olm"
58-
oc create -f "$REPO_DIR/olm/deploy/okd/manifests/latest/"
58+
cat $REPO_DIR/olm/deploy/okd/manifests/latest/*.crd.yaml | oc apply -f -
59+
sleep 1
60+
find $REPO_DIR/olm/deploy/okd/manifests/latest/ -type f ! -name "*crd.yaml" | sort | xargs cat | oc create -f -
5961
wait_for_all_pods openshift-operator-lifecycle-manager
6062
# perms required by the OLM console: $REPO_DIR/olm/scripts/run_console_local.sh
6163
oc adm policy add-cluster-role-to-user cluster-admin system:serviceaccount:kube-system:default

0 commit comments

Comments
 (0)