You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by as...@apache.org on 2022/01/12 13:54:00 UTC
[camel-k] 14/31: chore(e2e): Add extra RBAC permissions for the HTTP proxy tests
This is an automated email from the ASF dual-hosted git repository.
astefanutti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit c125dc979d79a83ea10bdd3a8a89644997ad952c
Author: Antonin Stefanutti <an...@stefanutti.fr>
AuthorDate: Mon Jan 10 10:54:42 2022 +0100
chore(e2e): Add extra RBAC permissions for the HTTP proxy tests
---
.github/workflows/openshift.yml | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/.github/workflows/openshift.yml b/.github/workflows/openshift.yml
index 1febe06..c7cd72d 100644
--- a/.github/workflows/openshift.yml
+++ b/.github/workflows/openshift.yml
@@ -216,6 +216,34 @@ jobs:
verbs: ["update"]
EOF
+ # Grant read permission on the Kubernetes Service to the default developer user
+ # Required by the HTTP proxy tests
+ cat <<EOF | oc apply -f -
+ kind: ClusterRole
+ apiVersion: rbac.authorization.k8s.io/v1
+ metadata:
+ name: camel-k-test:kubernetes-service
+ rules:
+ - apiGroups: [""]
+ resources: ["services"]
+ verbs: ["get"]
+ resourceNames: ["kubernetes"]
+ EOF
+ cat <<EOF | oc apply -f -
+ kind: RoleBinding
+ apiVersion: rbac.authorization.k8s.io/v1
+ metadata:
+ namespace: default
+ name: camel-k-test:kubernetes-service
+ subjects:
+ - kind: User
+ name: developer
+ roleRef:
+ kind: ClusterRole
+ name: camel-k-test:kubernetes-service
+ apiGroup: rbac.authorization.k8s.io
+ EOF
+
# Login as normal user
oc login -u developer