-
Notifications
You must be signed in to change notification settings - Fork 1
/
1000-driver-container.yaml
67 lines (67 loc) · 1.79 KB
/
1000-driver-container.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
apiVersion: v1
kind: ServiceAccount
metadata:
name: tigera-wireguard-kmod-driver-container
namespace: tigera-wireguard-kmod
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: tigera-wireguard-kmod-driver-container
namespace: tigera-wireguard-kmod
rules:
- apiGroups:
- security.openshift.io
resources:
- securitycontextconstraints
verbs:
- use
resourceNames:
- privileged
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: tigera-wireguard-kmod-driver-container
namespace: tigera-wireguard-kmod
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: tigera-wireguard-kmod-driver-container
subjects:
- kind: ServiceAccount
name: tigera-wireguard-kmod-driver-container
userNames:
- system:serviceaccount:tigera-wireguard-kmod:tigera-wireguard-kmod-driver-container
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: tigera-wireguard-kmod-driver-container
namespace: tigera-wireguard-kmod
spec:
selector:
matchLabels:
app: tigera-wireguard-kmod-driver-container
template:
metadata:
annotations:
alpha.image.policy.openshift.io/resolve-names: '*'
labels:
app: tigera-wireguard-kmod-driver-container
spec:
serviceAccount: tigera-wireguard-kmod-driver-container
serviceAccountName: tigera-wireguard-kmod-driver-container
containers:
- image: wireguard-kmod-driver-container:latest
name: tigera-wireguard-kmod-driver-container
imagePullPolicy: Always
command: ["/sbin/init"]
lifecycle:
preStop:
exec:
command: ["/bin/sh", "-c", "systemctl stop kmods-via-containers@tigera-wireguard-kmod"]
securityContext:
privileged: true
nodeSelector:
node-role.kubernetes.io/worker: ""