Files
service-state/ci/url-shortener/foundation.yaml
T

69 lines
1.6 KiB
YAML

apiVersion: v1
kind: ServiceAccount
metadata:
name: url-shortener-pipeline
automountServiceAccountToken: false
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: url-shortener-event-listener
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: url-shortener-event-listener
rules:
- apiGroups: [tekton.dev]
resources: [pipelineruns]
verbs: [create, get, list]
- apiGroups: [triggers.tekton.dev]
resources:
[
eventlisteners,
interceptors,
triggerbindings,
triggertemplates,
triggers,
]
verbs: [get, list, watch]
- apiGroups: [""]
resources: [configmaps]
verbs: [get, list, watch]
- apiGroups: [""]
resources: [serviceaccounts]
resourceNames: [url-shortener-pipeline]
verbs: [impersonate]
- apiGroups: [""]
resources: [events]
verbs: [create, patch]
- apiGroups: [""]
resources: [secrets]
resourceNames: [url-shortener-webhook]
verbs: [get]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: url-shortener-event-listener
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: url-shortener-event-listener
subjects:
- kind: ServiceAccount
name: url-shortener-event-listener
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: url-shortener-event-listener-interceptors
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: tekton-triggers-eventlistener-clusterroles
subjects:
- kind: ServiceAccount
name: url-shortener-event-listener
namespace: tekton-ci