Add RBAC pre-flight check to E2E pipeline #123

Closed
privilegedescalation-engineer[bot] wants to merge 6 commits from fix/pri-264-rbac-preflight-check into main
Showing only changes of commit 0cd9eb041d - Show all commits
+35
View File
@@ -31,6 +31,41 @@ rules:
resources: ["serviceaccounts/token"]
verbs: ["create"]
---
# RBAC for CI runner to apply Polaris dashboard RBAC in the polaris namespace.
# The E2E workflow runs `kubectl apply -f deployment/polaris-rbac.yaml` before
# the pre-flight check to make the workflow self-sufficient.
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: e2e-ci-runner-polaris
namespace: polaris
subjects:
- kind: ServiceAccount
name: runners-privilegedescalation-gha-rs-no-permission
namespace: arc-runners
roleRef:
kind: Role
name: e2e-ci-runner-polaris
apiGroup: rbac.authorization.k8s.io
rules:
- apiGroups: ["rbac.authorization.k8s.io"]
resources: ["roles", "rolebindings"]
verbs: ["get", "list", "create", "update", "patch", "delete"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: e2e-ci-runner-polaris-binding
namespace: polaris
subjects:
- kind: ServiceAccount
name: runners-privilegedescalation-gha-rs-no-permission
namespace: arc-runners
roleRef:
kind: Role
name: e2e-ci-runner-polaris
apiGroup: rbac.authorization.k8s.io
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata: