Skip to content

Commit

Permalink
👁️ Reduce the complexity and overhead of the vm.max-map-count update …
Browse files Browse the repository at this point in the history
…utility
  • Loading branch information
ndebuhr committed Jul 13, 2021
1 parent b8c30e2 commit 6c3ec06
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions kubernetes/node-max-map-count.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,25 @@ metadata:
name: vm-max-map-count
namespace: kube-system
labels:
k8s-app: vm-max-map-count
app: vm-max-map-count
spec:
selector:
matchLabels:
name: vm-max-map-count
app: vm-max-map-count
template:
metadata:
labels:
name: vm-max-map-count
app: vm-max-map-count
spec:
hostPID: true
containers:
initContainers:
- name: vm-max-map-count
image: gcr.io/google-containers/startup-script:v1
image: ubuntu:20.04
imagePullPolicy: Always
securityContext:
privileged: true
env:
- name: STARTUP_SCRIPT
value: |
#! /bin/bash
sleep 5
while true; do
sysctl -w vm.max_map_count=262144
sleep 300
done
command: ["/bin/bash", "-c"]
args: ["sysctl -w vm.max_map_count=262144"]
containers:
- name: pause
image: gcr.io/google_containers/pause:3.2

0 comments on commit 6c3ec06

Please sign in to comment.