Skip to content

Commit

Permalink
Fix csi-snapshotter RBAC yaml version
Browse files Browse the repository at this point in the history
Signed-off-by: Grant Griffiths <grant@portworx.com>
  • Loading branch information
ggriffiths committed Apr 16, 2020
1 parent 152396e commit 18c8d2f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion prow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1066,15 +1066,21 @@ main () {
docker tag "$i:latest" "$i:csiprow" || die "tagging the locally built container image for $i failed"
done

if [ -e deploy/kubernetes/rbac.yaml ]; then
if [ -e "$(pwd)/deploy/kubernetes/rbac.yaml" ] || [ -e "$(pwd)/deploy/kubernetes/csi-snapshotter/rbac-csi-snapshotter.yaml" ]; then
# This is one of those components which has its own RBAC rules (like external-provisioner).
# We are testing a locally built image and also want to test with the the current,
# potentially modified RBAC rules.

# snapshot-controller RBAC is handled by the cluster manager
cmds=${cmds//snapshot-controller/}
if [ "$(echo "$cmds" | wc -w)" != 1 ]; then
die "ambiguous deploy/kubernetes/rbac.yaml: need exactly one command, got: $cmds"
fi
e=$(echo "$cmds" | tr '[:lower:]' '[:upper:]' | tr - _)
images="$images ${e}_RBAC=$(pwd)/deploy/kubernetes/rbac.yaml"
if [ -e "$(pwd)/deploy/kubernetes/csi-snapshotter/rbac-csi-snapshotter.yaml" ]; then
images="$images ${e}_RBAC=$(pwd)/deploy/kubernetes/csi-snapshotter/rbac-csi-snapshotter.yaml"
fi
fi
fi

Expand Down

0 comments on commit 18c8d2f

Please sign in to comment.