-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdaemonset.yml
55 lines (54 loc) · 1.35 KB
/
daemonset.yml
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
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: selinux-demo
labels:
k8s-app: selinux-demo
spec:
selector:
matchLabels:
name: selinux-demo
template:
metadata:
labels:
name: selinux-demo
spec:
hostNetwork: true
nodeSelector:
node-role.kubernetes.io/control-plane: "true"
tolerations:
# these tolerations are to have the daemonset runnable on control plane nodes
# remove them if your control plane nodes should not run pods
- key: node-role.kubernetes.io/control-plane
operator: Exists
effect: NoSchedule
- key: node-role.kubernetes.io/master
operator: Exists
effect: NoSchedule
containers:
- name: weird-nginx
image: nginx
securityContext:
allowPrivilegeEscalation: true
runAsUser: 0
# seLinuxOptions:
# type: testselinux_t.process
resources:
limits:
memory: 200Mi
requests:
cpu: 100m
memory: 200Mi
volumeMounts:
- name: varlog
mountPath: /srv
- name: nginx-cm
mountPath: /etc/nginx/
terminationGracePeriodSeconds: 30
volumes:
- name: varlog
hostPath:
path: /var/log/
- name: nginx-cm
configMap:
name: selinux-demo