summaryrefslogtreecommitdiff
path: root/deploy/rbac.yaml
blob: 2b8819f8657652dc795bc5288570b799812655fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
apiVersion: v1
kind: ServiceAccount
metadata:
  name: webhook-example
  labels:
    app: webhook-example
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: webhook-example-crb
  labels:
    app: webhook-example
subjects:
  - kind: ServiceAccount
    name: webhook-example
    namespace: ${namespace}
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: webhook-example-cr
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: webhook-example-cr
  labels:
    app: webhook-example
rules:
  - apiGroups:
      - apps
    resources:
      - deployments
    verbs:
      - "*"