forked from aroute/cp4d35
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetkernelparams.yaml
56 lines (56 loc) · 1.63 KB
/
setkernelparams.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
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: kernel-optimization
namespace: kube-system
labels:
tier: management
app: kernel-optimization
spec:
selector:
matchLabels:
name: kernel-optimization
template:
metadata:
labels:
name: kernel-optimization
spec:
tolerations:
- operator: Exists
hostNetwork: true
hostPID: true
hostIPC: true
initContainers:
- command:
- sh
- -c
- sysctl -w kernel.sem="4096 1024000 250 4096"; sysctl -w kernel.msgmax="65536"; sysctl -w kernel.msgmnb="65536"; kernel.msgmni="3276"; sysctl -p;
# - sysctl -w kernel.sem="250 1024000 100 32768"; sysctl -w kernel.msgmax="65536"; sysctl -w kernel.msgmnb="65536"; sysctl -w kernel.msgmni="32768"; sysctl -w kernel.shmmni="32768"; sysctl -w vm.max_map_count="262144"; sysctl -w kernel.shmall="33554432"; sysctl -w kernel.shmmax="68719476736"; sysctl -p;
image: alpine:3.6
imagePullPolicy: IfNotPresent
name: sysctl
resources: {}
securityContext:
privileged: true
capabilities:
add:
- NET_ADMIN
volumeMounts:
- name: modifysys
mountPath: /sys
containers:
- resources:
requests:
cpu: 0.01
image: alpine:3.6
name: sleepforever
command: ["/bin/sh", "-c"]
args:
- >
while true; do
sleep 100000;
done
volumes:
- name: modifysys
hostPath:
path: /sys