Merge pull request #90494 from knabben/kubelet-provider

Migrating Kubelet --enable-server and --provider-id flags to config
This commit is contained in:
Kubernetes Prow Robot
2020-05-26 19:12:42 -07:00
committed by GitHub
11 changed files with 46 additions and 14 deletions

View File

@@ -155,7 +155,6 @@ func GetHollowKubeletConfig(opt *HollowKubletOptions) (*options.KubeletFlags, *k
// Flags struct
f := options.NewKubeletFlags()
f.EnableServer = true
f.RootDirectory = testRootDir
f.HostnameOverride = opt.NodeName
f.MinimumGCAge = metav1.Duration{Duration: 1 * time.Minute}
@@ -165,7 +164,6 @@ func GetHollowKubeletConfig(opt *HollowKubletOptions) (*options.KubeletFlags, *k
f.ContainerRuntimeOptions.ContainerRuntime = kubetypes.RemoteContainerRuntime
f.RegisterNode = true
f.RegisterSchedulable = true
f.ProviderID = fmt.Sprintf("kubemark://%v", opt.NodeName)
// Config struct
c, err := options.NewKubeletConfiguration()
@@ -174,6 +172,7 @@ func GetHollowKubeletConfig(opt *HollowKubletOptions) (*options.KubeletFlags, *k
}
c.StaticPodURL = ""
c.EnableServer = true
c.Address = "0.0.0.0" /* bind address */
c.Port = int32(opt.KubeletPort)
c.ReadOnlyPort = int32(opt.KubeletReadOnlyPort)
@@ -189,6 +188,7 @@ func GetHollowKubeletConfig(opt *HollowKubletOptions) (*options.KubeletFlags, *k
c.ClusterDNS = []string{}
c.ImageGCHighThresholdPercent = 90
c.ImageGCLowThresholdPercent = 80
c.ProviderID = fmt.Sprintf("kubemark://%v", opt.NodeName)
c.VolumeStatsAggPeriod.Duration = time.Minute
c.CgroupRoot = ""
c.CPUCFSQuota = true