-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinit-sysctl.yaml
More file actions
31 lines (30 loc) · 910 Bytes
/
init-sysctl.yaml
File metadata and controls
31 lines (30 loc) · 910 Bytes
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
apiVersion: v1
kind: ConfigMap
metadata:
name: test-sysctl
labels:
release: test-sysctl
data:
init_sysctl.sh: |-
echo "sysctl -n vm.max_map_count = " $(sysctl -n vm.max_map_count)
echo "sysctl -n fs.file-max = " $(sysctl -n fs.file-max)
sysctl -w vm.max_map_count=524288
sysctl -w fs.file-max=131072
#if [[ "$(sysctl -n vm.max_map_count)" -lt 524288 ]]; then
# sysctl -w vm.max_map_count=524288
#fi
#if [[ "$(sysctl -n fs.file-max)" -lt 131072 ]]; then
# sysctl -w fs.file-max=131072
#fi
if [[ "$(ulimit -n)" != "unlimited" ]]; then
# if [[ "$(ulimit -n)" -lt 131072 ]]; then
echo "ulimit -n 131072"
ulimit -n 131072
# fi
fi
if [[ "$(ulimit -u)" != "unlimited" ]]; then
# if [[ "$(ulimit -u)" -lt 8192 ]]; then
echo "ulimit -u 8192"
ulimit -u 8192
# fi
fi