From 2f7b8f45a4534c7d2b870eeb60231c23af729c07 Mon Sep 17 00:00:00 2001 From: eding Date: Sun, 8 Feb 2026 19:30:31 +0100 Subject: [PATCH] chore: rbac --- rbac.yaml | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 rbac.yaml diff --git a/rbac.yaml b/rbac.yaml new file mode 100644 index 0000000..c7248fa --- /dev/null +++ b/rbac.yaml @@ -0,0 +1,41 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: tekton-triggers-sa + namespace: tekton-pipelines +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: tekton-triggers-role + namespace: tekton-pipelines +rules: + # Permissions to allow the EventListener to see its own config + - apiGroups: ["triggers.tekton.dev"] + resources: ["eventlisteners", "triggerbindings", "triggertemplates", "triggers"] + verbs: ["get", "list", "watch"] + # Permissions to allow the EventListener to start pipelines + - apiGroups: ["tekton.dev"] + resources: ["pipelineruns", "taskruns"] + verbs: ["create"] + # Permissions to allow the EventListener to create dynamic namespaces/secrets (for Previews) + - apiGroups: [""] + resources: ["namespaces", "secrets", "configmaps"] + verbs: ["get", "list", "create", "update", "patch"] + # Permissions for HelmReleases in Preview namespaces + - apiGroups: ["helm.toolkit.fluxcd.io"] + resources: ["helmreleases"] + verbs: ["get", "list", "create", "update", "patch"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: tekton-triggers-binding + namespace: tekton-pipelines +subjects: + - kind: ServiceAccount + name: tekton-triggers-sa +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: tekton-triggers-role \ No newline at end of file