Set oom_score_adj for kubelet and kube-proxy to a low value to help them survive system memory pressure.

This commit is contained in:
Vishnu Kannan
2014-12-24 00:03:26 +00:00
parent 8824e46340
commit 6f53f33fda
3 changed files with 25 additions and 0 deletions

View File

@@ -42,6 +42,7 @@ var (
bindAddress = util.IP(net.ParseIP("0.0.0.0"))
clientConfig = &client.Config{}
healthz_port = flag.Int("healthz_port", 10249, "The port to bind the health check server. Use 0 to disable.")
oomScoreAdj = flag.Int("oom_score_adj", -899, "The oom_score_adj value for kube-proxy process. Values must be within the range [-1000, 1000]")
)
func init() {
@@ -55,6 +56,10 @@ func main() {
util.InitLogs()
defer util.FlushLogs()
if err := util.ApplyOomScoreAdj(*oomScoreAdj); err != nil {
glog.Info(err)
}
verflag.PrintAndExitIfRequested()
serviceConfig := config.NewServiceConfig()