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

Commit cb006ee

Browse files
committed
Be more vigilant about not accidentally re-installing OLM
1 parent 47dac0c commit cb006ee

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

etc/scripts/installation-functions.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ function install_olm {
156156
oc adm policy add-cluster-role-to-user cluster-admin system:serviceaccount:knative-build:build-controller
157157
oc adm policy add-cluster-role-to-user cluster-admin system:serviceaccount:knative-serving:controller
158158
oc adm policy add-cluster-role-to-user cluster-admin system:serviceaccount:knative-eventing:default
159-
else
159+
elif [ "$(olm_namespace)" = "" ]; then
160160
local REPO_DIR="$ROOT_DIR/.repos"
161161
local OLM_DIR="$REPO_DIR/olm"
162162
mkdir -p "$REPO_DIR"
@@ -168,6 +168,8 @@ function install_olm {
168168
wait_for_all_pods openshift-operator-lifecycle-manager
169169
# perms required by the OLM console: $OLM_DIR/scripts/run_console_local.sh
170170
# oc adm policy add-cluster-role-to-user cluster-admin system:serviceaccount:kube-system:default
171+
else
172+
echo "Detected OLM - skipping installation"
171173
fi
172174
}
173175

0 commit comments

Comments
 (0)