mirror of https://github.com/k3s-io/k3s
Make createAndInitKubelet public to be reusable
parent
cd760cc4ea
commit
2c03c04879
|
@ -714,7 +714,7 @@ func RunKubelet(kcfg *KubeletConfig) error {
|
||||||
|
|
||||||
builder := kcfg.Builder
|
builder := kcfg.Builder
|
||||||
if builder == nil {
|
if builder == nil {
|
||||||
builder = createAndInitKubelet
|
builder = CreateAndInitKubelet
|
||||||
}
|
}
|
||||||
if kcfg.OSInterface == nil {
|
if kcfg.OSInterface == nil {
|
||||||
kcfg.OSInterface = kubecontainer.RealOS{}
|
kcfg.OSInterface = kubecontainer.RealOS{}
|
||||||
|
@ -848,7 +848,7 @@ type KubeletConfig struct {
|
||||||
VolumePlugins []volume.VolumePlugin
|
VolumePlugins []volume.VolumePlugin
|
||||||
}
|
}
|
||||||
|
|
||||||
func createAndInitKubelet(kc *KubeletConfig) (k KubeletBootstrap, pc *config.PodConfig, err error) {
|
func CreateAndInitKubelet(kc *KubeletConfig) (k KubeletBootstrap, pc *config.PodConfig, err error) {
|
||||||
// TODO: block until all sources have delivered at least one update to the channel, or break the sync loop
|
// TODO: block until all sources have delivered at least one update to the channel, or break the sync loop
|
||||||
// up into "per source" synchronizations
|
// up into "per source" synchronizations
|
||||||
// TODO: KubeletConfig.KubeClient should be a client interface, but client interface misses certain methods
|
// TODO: KubeletConfig.KubeClient should be a client interface, but client interface misses certain methods
|
||||||
|
|
Loading…
Reference in New Issue