mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-06 03:33:26 +00:00
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:
@@ -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()
|
||||
|
Reference in New Issue
Block a user