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

Commit 899678c

Browse files
committed
Configure istio-required perms for myproject on any cluster
Not just minishift, that is. And we'll create the myproject project if necessary.
1 parent 22f2708 commit 899678c

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

etc/scripts/install-on-minishift.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,5 @@ eval "$(minishift oc-env)"
3030

3131
oc login -u admin -p admin
3232

33-
# these perms are required by istio
34-
oc project myproject
35-
until oc adm policy add-scc-to-user privileged -z default; do sleep 5; done
36-
oc adm policy add-scc-to-user anyuid -z default
37-
3833
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
3934
"$DIR/install.sh" -q

etc/scripts/install.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,12 @@ oc -n knative-serving get cm config-controller -oyaml | sed "s/\(^ *registriesSk
3838
oc import-image -n openshift golang --from=centos/go-toolset-7-centos7 --confirm
3939
oc import-image -n openshift golang:1.11 --from=centos/go-toolset-7-centos7 --confirm
4040

41+
# these perms are required by istio
42+
if ! oc project myproject 2>/dev/null; then
43+
oc new-project myproject
44+
fi
45+
oc adm policy add-scc-to-user privileged -z default
46+
oc adm policy add-scc-to-user anyuid -z default
47+
4148
# show all the pods
4249
oc get pods --all-namespaces

0 commit comments

Comments
 (0)