-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdeployment-rbac.yaml
53 lines (50 loc) · 1 KB
/
deployment-rbac.yaml
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
namespace: default
name: zk-announser
spec:
replicas: 1
template:
metadata:
labels:
app: zk-announser
spec:
serviceAccount: zk-announser
containers:
- name: announser
image: quay.io/mad01/k8s-zk-announser:52aab4b
command:
- "./k8s-zk-announser"
args:
- "-zookeeper.addr=zookeeper"
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
name: zk-announser
namespace: default
rules:
- apiGroups: [""]
resources: ["services"]
verbs: ["get", "watch", "list"]
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: zk-announser
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: zk-announser
subjects:
- kind: ServiceAccount
name: zk-announser
namespace: default
---
apiVersion: v1
kind: ServiceAccount
metadata:
namespace: default
name: zk-announser