Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

Commit 6c3ec06

Browse files
committed
👁️ Reduce the complexity and overhead of the vm.max-map-count update utility
1 parent b8c30e2 commit 6c3ec06

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

kubernetes/node-max-map-count.yaml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,25 @@ metadata:
44
name: vm-max-map-count
55
namespace: kube-system
66
labels:
7-
k8s-app: vm-max-map-count
7+
app: vm-max-map-count
88
spec:
99
selector:
1010
matchLabels:
11-
name: vm-max-map-count
11+
app: vm-max-map-count
1212
template:
1313
metadata:
1414
labels:
15-
name: vm-max-map-count
15+
app: vm-max-map-count
1616
spec:
1717
hostPID: true
18-
containers:
18+
initContainers:
1919
- name: vm-max-map-count
20-
image: gcr.io/google-containers/startup-script:v1
20+
image: ubuntu:20.04
2121
imagePullPolicy: Always
2222
securityContext:
2323
privileged: true
24-
env:
25-
- name: STARTUP_SCRIPT
26-
value: |
27-
#! /bin/bash
28-
sleep 5
29-
while true; do
30-
sysctl -w vm.max_map_count=262144
31-
sleep 300
32-
done
24+
command: ["/bin/bash", "-c"]
25+
args: ["sysctl -w vm.max_map_count=262144"]
26+
containers:
27+
- name: pause
28+
image: gcr.io/google_containers/pause:3.2

0 commit comments

Comments
 (0)