44 lines
1.4 KiB
YAML
44 lines
1.4 KiB
YAML
apiVersion: v1
|
|
kind: ServiceAccount
|
|
metadata:
|
|
name: tekton-triggers-sa
|
|
namespace: tekton-pipelines
|
|
secrets:
|
|
- name: gh-auth-tekton-pipelines
|
|
imagePullSecrets:
|
|
- name: ghcr-auth
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRole
|
|
metadata:
|
|
name: tekton-triggers-cluster-role
|
|
rules:
|
|
# Permissions to allow the EventListener to see its own config
|
|
- apiGroups: ["triggers.tekton.dev"]
|
|
resources: ["eventlisteners", "triggerbindings", "triggertemplates", "triggers", "interceptors", "clusterinterceptors", "clustertriggerbindings"]
|
|
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: ClusterRoleBinding
|
|
metadata:
|
|
name: tekton-triggers-binding
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: ClusterRole
|
|
name: tekton-triggers-cluster-role
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: tekton-triggers-sa
|
|
namespace: tekton-pipelines |