-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdaemonset.yml
40 lines (40 loc) · 1.19 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
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: daemonset
labels:
name: daemonset
spec:
selector:
matchLabels:
name: daemonset
template:
metadata:
labels:
name: daemonset
spec:
hostPID: true
containers:
- name: daemonset
image: gcr.io/google-containers/startup-script:v2
imagePullPolicy: Always
securityContext:
privileged: true
env:
- name: STARTUP_SCRIPT
value: |
#! /bin/bash
set -x
sysctl -w vm.max_map_count=262144
sysctl -w net.core.somaxconn=1024
sysctl -w net.core.netdev_max_backlog=5000
sysctl -w net.core.rmem_max=16777216
sysctl -w net.core.wmem_max=16777216
sysctl -w net.ipv4.tcp_wmem="4096 12582912 16777216"
sysctl -w net.ipv4.tcp_rmem="4096 12582912 16777216"
sysctl -w net.ipv4.tcp_max_syn_backlog=8096
sysctl -w net.ipv4.tcp_slow_start_after_idle=0
sysctl -w net.ipv4.tcp_tw_reuse=1
sysctl -w net.ipv4.ip_local_port_range="10240 65535"
sysctl -w fs.inotify.max_user_instances=524288
echo "done"