-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathrbac.yaml
More file actions
58 lines (57 loc) · 1.08 KB
/
Copy pathrbac.yaml
File metadata and controls
58 lines (57 loc) · 1.08 KB
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
54
55
56
57
58
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: krelay
rules:
# create the krelay-server Job; clean it up on client exit (Job deletion
# cascades to the pod via PropagationPolicy=Background).
- apiGroups:
- batch
resources:
- jobs
verbs:
- create
- delete
# watch the Job's pod to learn its name and wait for it to become Running.
- apiGroups:
- ""
resources:
- pods
verbs:
- watch
# open the port-forward stream to the krelay-server pod.
- apiGroups:
- ""
resources:
- pods/portforward
verbs:
- create
# The following permissions are only required if you want to forward the local port to the respective objects.
- apiGroups:
- ""
resources:
- services
- pods
verbs:
- get
- apiGroups:
- apps
resources:
- replicasets
- deployments
- statefulsets
- daemonsets
verbs:
- get
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: krelay
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: krelay
subjects:
- kind: User
name: <Please fill in your username here>