-
Notifications
You must be signed in to change notification settings - Fork 0
/
scc.yaml
50 lines (48 loc) · 1.06 KB
/
scc.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
# remember to "oc set sa deployment openvpn-server ovpnrunner"
# also, you need to manually modprobe tun to all worker nodes (or use the modules operator)
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: ovpnrunner
namespace: openvpn-server
---
kind: SecurityContextConstraints
apiVersion: security.openshift.io/v1
metadata:
name: anyuid-netadmin
annotations:
⦙ kubernetes.io/description: anyuid scc with mknod and net_admin capabilities
allowedCapabilities:
- NET_ADMIN
- MKNOD
fsGroup:
type: RunAsAny
runAsUser:
type: RunAsAny
seLinuxContext:
type: MustRunAs
supplementalGroups:
type: RunAsAny
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: system:openshift:scc:anyuid-netadmin
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: system:openshift:scc:anyuid-netadmin
subjects:
- kind: ServiceAccount
name: ovpnrunner
namespace: openvpn-server
rules:
- apiGroups:
- security.openshift.io
resourceNames:
- anyuid-netadmin
resources:
- securitycontextconstraints
verbs:
- use