cluster.fun/tekton/2-Setup/eventlistener-rbac.yaml

40 lines
865 B
YAML

apiVersion: v1
kind: ServiceAccount
metadata:
name: eventlistener
namespace: tekton-pipelines
---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: eventlistener
namespace: tekton-pipelines
rules:
- apiGroups: ["triggers.tekton.dev"]
resources: ["eventlisteners", "triggerbindings", "triggertemplates"]
verbs: ["get"]
- apiGroups: [""]
resources: ["configmaps", "secrets", "serviceaccounts"]
verbs: ["get", "list", "watch"]
- apiGroups: ["tekton.dev"]
resources: ["pipelineruns", "pipelineresources", "taskruns"]
verbs: ["create"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: eventlistener
namespace: tekton-pipelines
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: eventlistener
subjects:
- kind: ServiceAccount
name: eventlistener
namespace: tekton-pipelines