Skip to content

Commit

Permalink
hack/tests/e2e-helm.sh: allow nginx image to run as root
Browse files Browse the repository at this point in the history
  • Loading branch information
joelanford committed Nov 27, 2018
1 parent ee8b12d commit 6f68e57
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions hack/tests/e2e-helm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,14 @@ DEST_IMAGE="quay.io/example/nginx-operator:v0.0.2"

set -ex

# switch to the "default" namespace if on openshift
if which oc 2>/dev/null; then oc project default; fi
# if on openshift switch to the "default" namespace
# and allow containers to run as root (necessary for
# default nginx image)
if which oc 2>/dev/null;
then
oc project default
oadm policy add-scc-to-user anyuid -z default
fi

# build operator binary and base image
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o test/helm-operator/helm-operator test/helm-operator/cmd/helm-operator/main.go
Expand Down

0 comments on commit 6f68e57

Please sign in to comment.