95f6bbb1c0
The E2E workflow and deploy scripts were targeting the legacy privilegedescalation-dev namespace, which is not managed by Flux GitOps in privilegedescalation/infra. The infra repo (PR #11) already provisions the headlamp-dev namespace and corresponding RBAC (e2e-ci-runner-headlamp-rbac.yaml) that grants the ARC runner SA (runners-privilegedescalation-gha-rs-no-permission in arc-runners) the permissions needed to deploy/teardown the E2E Headlamp instance. This change aligns all E2E infrastructure to use headlamp-dev: - .github/workflows/e2e.yaml: E2E_NAMESPACE=headlamp-dev - scripts/deploy-e2e-headlamp.sh: default namespace and comments - scripts/teardown-e2e-headlamp.sh: default namespace - deployment/e2e-ci-runner-rbac.yaml: namespace and add missing events permission (already present in infra copy) Refs: PRI-423 Co-Authored-By: Paperclip <noreply@paperclip.ing>
47 lines
1.6 KiB
YAML
47 lines
1.6 KiB
YAML
---
|
|
# RBAC for the GitHub Actions CI runner to manage the E2E Headlamp instance.
|
|
# CI-only test fixture — NOT for production use.
|
|
#
|
|
# Grants the ARC runner service account permissions in the headlamp-dev
|
|
# namespace to deploy and tear down a dedicated Headlamp instance via Helm.
|
|
# E2E resources run in `headlamp-dev` — nothing persists beyond a test run.
|
|
#
|
|
# Plugin is loaded via ConfigMap volume mount — no custom Docker images.
|
|
#
|
|
# Note: This RBAC is mirrored in privilegedescalation/infra (base/rbac/)
|
|
# and managed by Flux GitOps. The infra repo is the source of truth.
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: Role
|
|
metadata:
|
|
name: e2e-ci-runner
|
|
namespace: headlamp-dev
|
|
rules:
|
|
# Helm needs to manage these resources for the Headlamp chart
|
|
- apiGroups: ["apps"]
|
|
resources: ["deployments"]
|
|
verbs: ["get", "list", "create", "update", "patch", "delete", "watch"]
|
|
- apiGroups: [""]
|
|
resources: ["services", "serviceaccounts", "configmaps", "secrets", "events"]
|
|
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
|
|
- apiGroups: [""]
|
|
resources: ["pods"]
|
|
verbs: ["get", "list", "watch"]
|
|
# Token creation for E2E test auth
|
|
- apiGroups: [""]
|
|
resources: ["serviceaccounts/token"]
|
|
verbs: ["create"]
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: RoleBinding
|
|
metadata:
|
|
name: e2e-ci-runner-binding
|
|
namespace: headlamp-dev
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: runners-privilegedescalation-gha-rs-no-permission
|
|
namespace: arc-runners
|
|
roleRef:
|
|
kind: Role
|
|
name: e2e-ci-runner
|
|
apiGroup: rbac.authorization.k8s.io
|