mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-19 17:16:12 +00:00
Merge pull request #90494 from knabben/kubelet-provider
Migrating Kubelet --enable-server and --provider-id flags to config
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user