@@ -133,6 +133,7 @@ func (s *KubeletServer) AddFlags(fs *pflag.FlagSet) {
fs.MarkDeprecated("system-container","Use --system-cgroups instead. Will be removed in a future version.")
fs.StringVar(&s.SystemCgroups,"system-cgroups",s.SystemCgroups,"Optional absolute name of cgroups in which to place all non-kernel processes that are not already inside a cgroup under `/`. Empty for no container. Rolling back the flag requires a reboot. (Default: \"\").")
fs.BoolVar(&s.CgroupsPerQOS,"cgroups-per-qos",s.CgroupsPerQOS,"Enable creation of QoS cgroup hierarchy, if true top level QoS and pod cgroups are created.")
fs.StringVar(&s.CgroupRoot,"cgroup-root",s.CgroupRoot,"Optional root cgroup to use for pods. This is handled by the container runtime on a best effort basis. Default: '', which means use the container runtime default.")
fs.StringVar(&s.ContainerRuntime,"container-runtime",s.ContainerRuntime,"The container runtime to use. Possible values: 'docker', 'rkt'. Default: 'docker'.")
fs.DurationVar(&s.RuntimeRequestTimeout.Duration,"runtime-request-timeout",s.RuntimeRequestTimeout.Duration,"Timeout of all runtime requests except long running request - pull, logs, exec and attach. When timeout exceeded, kubelet will cancel the request, throw out an error and retry later. Default: 2m0s")
// Check if Cgroup-root actually exists on the node
ifnodeConfig.CgroupsPerQOS{
ifnodeConfig.CgroupRoot==""{
returnnil,fmt.Errorf("invalid configuration: cgroups-per-qos was specified and cgroup-root was not specified. To enable the QoS cgroup hierarchy you need to specify a valid cgroup-root")
// Name of the node to run tests on (node e2e suite only).
NodeNamestring
// Whether to enable the QoS Cgroup Hierarchy or not
CgroupsPerQOSbool
}
typeCloudConfigstruct{
...
...
@@ -148,4 +150,5 @@ func RegisterClusterFlags() {
// Register flags specific to the node e2e test suite.
funcRegisterNodeFlags(){
flag.StringVar(&TestContext.NodeName,"node-name","","Name of the node to run tests on (node e2e suite only).")
flag.BoolVar(&TestContext.CgroupsPerQOS,"cgroups-per-qos",false,"Enable creation of QoS cgroup hierarchy, if true top level QoS and pod cgroups are created.")