Skip to content

Commit d2d7ba3

Browse files
authored
Create RBAC role for tests to run on 1.8+ clusters (#41)
* prevent failure of script during execution * Add rbac rule application
1 parent ccd7e1a commit d2d7ba3

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

e2e/e2e-prow.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,17 @@ properties=(
5353
-Dspark.kubernetes.test.imageRepo=$IMAGE_REPO \
5454
-Dspark.kubernetes.test.sparkTgz="$SPARK_TGZ" \
5555
-Dspark.kubernetes.test.deployMode=cloud \
56-
-Dspark.kubernetes.test.namespace=default \
57-
-Dspark.kubernetes.test.serviceAccountName=default
56+
-Dspark.kubernetes.test.namespace=spark \
57+
-Dspark.kubernetes.test.serviceAccountName=spark-sa
5858
)
5959

60+
# Run kubectl commands and create appropriate roles
61+
kubectl create clusterrolebinding cluster-admin-binding --clusterrole cluster-admin --user pr-kubekins@kubernetes-jenkins-pull.iam.gserviceaccount.com
62+
kubectl create -f ./dev/spark-rbac.yaml
63+
6064
# Run tests.
6165
echo "Starting test with ${properties[@]}"
62-
build/mvn integration-test "${properties[@]}"
66+
build/mvn integration-test "${properties[@]}" || :
6367

6468
# Copy out the junit xml files for consumption by k8s test-infra.
6569
ls -1 ./target/surefire-reports/*.xml | cat -n | while read n f; do cp "$f" "/workspace/_artifacts/junit_0$n.xml"; done

0 commit comments

Comments
 (0)