Skip to content

Instantly share code, notes, and snippets.

@mariojacobo
Created June 13, 2019 12:06
Show Gist options
  • Save mariojacobo/bbe9940b479f700f0e79dfb0fff69ff3 to your computer and use it in GitHub Desktop.
Save mariojacobo/bbe9940b479f700f0e79dfb0fff69ff3 to your computer and use it in GitHub Desktop.
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: busy
namespace: default
labels:
tier: management
app: kernel-optimization
spec:
selector:
matchLabels:
name: kernel-optimization
template:
metadata:
labels:
name: kernel-optimization
spec:
hostNetwork: true
hostPID: true
hostIPC: true
initContainers:
- command:
- sh
- -c
- sysctl -w net.ipv4.tcp_max_syn_backlog=4096; sysctl -w net.core.somaxconn=4096; sysctl -w net.core.netdev_max_backlog=4096
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: busybox:latest
name: sleepforever
command: ["/bin/sh", "-c"]
args:
- >
while true; do
sleep 100000;
done
volumes:
- name: modifysys
hostPath:
path: /sys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment