add extra options to minikube start directly
parent
daff8762be
commit
fe6cbc4e42
|
@ -35,6 +35,7 @@ import (
|
|||
"k8s.io/minikube/pkg/minikube/config"
|
||||
"k8s.io/minikube/pkg/minikube/constants"
|
||||
"k8s.io/minikube/pkg/minikube/cruntime"
|
||||
"k8s.io/minikube/pkg/minikube/detect"
|
||||
"k8s.io/minikube/pkg/minikube/download"
|
||||
"k8s.io/minikube/pkg/minikube/driver"
|
||||
"k8s.io/minikube/pkg/minikube/exit"
|
||||
|
@ -480,6 +481,11 @@ func generateNewConfigFromFlags(cmd *cobra.Command, k8sVersion string, drvName s
|
|||
cc.ContainerVolumeMounts = []string{viper.GetString(mountString)}
|
||||
}
|
||||
|
||||
if detect.IsCloudShell() {
|
||||
cc.KubernetesConfig.ExtraOptions.Set("kubelet.cgroups-per-qos=false")
|
||||
cc.KubernetesConfig.ExtraOptions.Set("kubelet.enforce-node-allocatable=\"\"")
|
||||
}
|
||||
|
||||
return cc
|
||||
}
|
||||
|
||||
|
|
|
@ -83,10 +83,7 @@ func TestStartStop(t *testing.T) {
|
|||
version string
|
||||
args []string
|
||||
}{
|
||||
{"cloud-shell", constants.DefaultKubernetesVersion, []string{
|
||||
"--extra-config=kubelet.cgroups-per-qos=false",
|
||||
"--extra-config=kubelet.enforce-node-allocatable=\"\"",
|
||||
}},
|
||||
{"cloud-shell", constants.DefaultKubernetesVersion, []string{}},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue