Merge pull request #2017 from justinsb/kube_proxy_oomscore

Set OOM for kube-proxy
This commit is contained in:
Chris Love 2017-03-03 22:05:32 -07:00 committed by GitHub
commit a7533f897c
1 changed files with 9 additions and 1 deletions

View File

@ -4,7 +4,15 @@ kind: Pod
metadata: metadata:
name: kube-proxy name: kube-proxy
namespace: kube-system namespace: kube-system
# This annotation ensures that kube-proxy does not get evicted if the node
# supports critical pod annotation based priority scheme.
# Note that kube-proxy runs as a static pod so this annotation does NOT have
# any effect on rescheduler (default scheduler and rescheduler are not
# involved in scheduling kube-proxy).
annotations:
scheduler.alpha.kubernetes.io/critical-pod: ''
labels: labels:
tier: node
k8s-app: kube-proxy k8s-app: kube-proxy
spec: spec:
hostNetwork: true hostNetwork: true
@ -17,7 +25,7 @@ spec:
command: command:
- /bin/sh - /bin/sh
- -c - -c
- kube-proxy --kubeconfig=/var/lib/kube-proxy/kubeconfig --resource-container="" {{ BuildFlags KubeProxy }} 1>>/var/log/kube-proxy.log 2>&1 - echo -998 > /proc/$$$/oom_score_adj && kube-proxy --kubeconfig=/var/lib/kube-proxy/kubeconfig --resource-container="" {{ BuildFlags KubeProxy }} 1>>/var/log/kube-proxy.log 2>&1
securityContext: securityContext:
privileged: true privileged: true
volumeMounts: volumeMounts: