Skip to content

Commit 6316894

Browse files
authored
Merge pull request #574 from andyzhangx/remove-mlocate-ds
doc: add remove-mlocate daemonset
2 parents 0384882 + 147dfd6 commit 6316894

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

deploy/example/remove-mlocate-ds.yaml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
apiVersion: apps/v1
3+
kind: DaemonSet
4+
metadata:
5+
labels:
6+
component: remove-mlocate
7+
name: remove-mlocate
8+
namespace: kube-system
9+
spec:
10+
selector:
11+
matchLabels:
12+
component: remove-mlocate
13+
tier: node
14+
template:
15+
metadata:
16+
labels:
17+
component: remove-mlocate
18+
tier: node
19+
spec:
20+
containers:
21+
- command:
22+
- nsenter
23+
- --target
24+
- "1"
25+
- --mount
26+
- --uts
27+
- --ipc
28+
- --net
29+
- --pid
30+
- --
31+
- sh
32+
- -c
33+
- |
34+
rm /etc/cron.daily/mlocate -f
35+
sleep 600000000s
36+
image: alpine
37+
imagePullPolicy: IfNotPresent
38+
name: remove-mlocate
39+
resources:
40+
requests:
41+
cpu: 10m
42+
securityContext:
43+
privileged: true
44+
hostPID: true
45+
nodeSelector:
46+
kubernetes.io/os: linux
47+
tolerations:
48+
- effect: NoSchedule
49+
operator: Exists
50+
restartPolicy: Always
51+
updateStrategy:
52+
type: OnDelete

0 commit comments

Comments
 (0)