chore(e2e): Create aggregated ClusterRole for pod eviction on OpenShift
@@ -159,6 +159,21 @@ jobs:
echo "installing camel k cluster resources"
./kamel install --cluster-setup
+ # Aggregate pod eviction permission to the default admin role
+ cat <<EOF | oc apply -f -
+ kind: ClusterRole
+ apiVersion: rbac.authorization.k8s.io/v1
+ metadata:
+ name: camel-k:eviction
+ labels:
+ app: "camel-k"
+ rbac.authorization.k8s.io/aggregate-to-admin: "true"
+ rules:
+ - apiGroups: [""]
+ resources: ["pods/eviction"]
+ verbs: ["create"]
+ EOF
+
# Login as normal user
oc login -u developer
