fix(e2e): add cluster-scoped RBAC for CI runner
The Headlamp Helm chart manages ClusterRole and ClusterRoleBinding resources. The CI runner SA needs cluster-level permissions to get/update these during helm upgrade. Added ClusterRole and ClusterRoleBinding alongside the existing namespace-scoped Role. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -2,11 +2,37 @@
|
|||||||
# RBAC for the GitHub Actions CI runner to perform E2E test setup.
|
# RBAC for the GitHub Actions CI runner to perform E2E test setup.
|
||||||
# CI-only test fixture — NOT for production use.
|
# CI-only test fixture — NOT for production use.
|
||||||
#
|
#
|
||||||
# Grants the ARC runner service account permissions in kube-system to:
|
# The Headlamp Helm chart manages cluster-scoped resources (ClusterRole,
|
||||||
# - Create/manage PVCs (shared plugin volume)
|
# ClusterRoleBinding). The CI runner SA needs cluster-level read/write on
|
||||||
# - Run temporary pods (plugin deploy helper)
|
# these resources for `helm upgrade` to succeed, plus namespace-scoped
|
||||||
# - Manage Helm release resources (secrets, configmaps, services)
|
# permissions in kube-system for PVCs, pods, Helm secrets, etc.
|
||||||
# - Restart deployments (Headlamp rollout after plugin deploy)
|
#
|
||||||
|
# Apply with: kubectl apply -f deployment/e2e-ci-runner-rbac.yaml
|
||||||
|
|
||||||
|
# --- Cluster-scoped permissions (for Headlamp Helm chart resources) ---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: e2e-ci-runner
|
||||||
|
rules:
|
||||||
|
- apiGroups: ["rbac.authorization.k8s.io"]
|
||||||
|
resources: ["clusterroles", "clusterrolebindings"]
|
||||||
|
verbs: ["get", "list", "create", "update", "patch", "delete"]
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
name: e2e-ci-runner-binding
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: local-ubuntu-latest-gha-rs-no-permission
|
||||||
|
namespace: arc-runners
|
||||||
|
roleRef:
|
||||||
|
kind: ClusterRole
|
||||||
|
name: e2e-ci-runner
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
---
|
||||||
|
# --- Namespace-scoped permissions (kube-system) ---
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
kind: Role
|
kind: Role
|
||||||
metadata:
|
metadata:
|
||||||
|
|||||||
Reference in New Issue
Block a user