65 lines
1.6 KiB
YAML
65 lines
1.6 KiB
YAML
apiVersion: v1
|
|
kind: ServiceAccount
|
|
metadata:
|
|
name: tekton-triggers-sa
|
|
namespace: tekton-demo
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: Role
|
|
metadata:
|
|
name: tekton-build-role
|
|
namespace: tekton-demo
|
|
rules:
|
|
- apiGroups: ["", "apps", "tekton.dev", "triggers.tekton.dev"]
|
|
resources: ["pods", "pipelineruns", "tasks", "events"]
|
|
verbs: ["get", "list", "watch", "create", "update", "delete"]
|
|
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: RoleBinding
|
|
metadata:
|
|
name: tekton-build-sa-binding
|
|
namespace: tekton-demo
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: tekton-build-sa
|
|
roleRef:
|
|
kind: Role
|
|
name: tekton-build-role
|
|
apiGroup: rbac.authorization.k8s.io
|
|
---
|
|
apiVersion: v1
|
|
kind: ServiceAccount
|
|
metadata:
|
|
name: tekton-build-sa
|
|
namespace: tekton-demo
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRole
|
|
metadata:
|
|
name: tekton-triggers-role
|
|
rules:
|
|
- apiGroups: [""] # core API
|
|
resources: ["pods", "services", "endpoints", "configmaps", "secrets"]
|
|
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
|
|
- apiGroups: ["apps"]
|
|
resources: ["deployments"]
|
|
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
|
|
- apiGroups: ["triggers.tekton.dev"]
|
|
resources: ["eventlisteners", "triggerbindings", "triggertemplates", "triggers"]
|
|
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRoleBinding
|
|
metadata:
|
|
name: tekton-build-sa-binding
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: tekton-build-sa
|
|
namespace: tekton-demo
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: ClusterRole
|
|
name: cluster-admin
|
|
|