validate KubeletCgroups and KubeReservedCgroup

modify

modify
This commit is contained in:
yanghaichao12 2019-01-08 05:09:17 -05:00
parent 35b17dd6d0
commit f2e198fdea

View File

@ -31,6 +31,7 @@ import (
"path"
"path/filepath"
"strconv"
"strings"
"time"
"github.com/coreos/go-systemd/daemon"
@ -207,6 +208,10 @@ HTTP server: The kubelet can also listen for HTTP and respond to a simple API
klog.Fatal(err)
}
if (kubeletConfig.KubeletCgroups != "" && kubeletConfig.KubeReservedCgroup != "") && (0 != strings.Index(kubeletConfig.KubeletCgroups, kubeletConfig.KubeReservedCgroup)) {
klog.Warning("unsupported configuration:KubeletCgroups is not within KubeReservedCgroup")
}
// use dynamic kubelet config, if enabled
var kubeletConfigController *dynamickubeletconfig.Controller
if dynamicConfigDir := kubeletFlags.DynamicConfigDir.Value(); len(dynamicConfigDir) > 0 {