Allow to override the pod config in CreateAndInitKubelet
This commit is contained in:
@@ -826,6 +826,7 @@ type KubeletConfig struct {
|
|||||||
OOMAdjuster *oom.OOMAdjuster
|
OOMAdjuster *oom.OOMAdjuster
|
||||||
OSInterface kubecontainer.OSInterface
|
OSInterface kubecontainer.OSInterface
|
||||||
PodCIDR string
|
PodCIDR string
|
||||||
|
PodConfig *config.PodConfig
|
||||||
PodInfraContainerImage string
|
PodInfraContainerImage string
|
||||||
Port uint
|
Port uint
|
||||||
ReadOnlyPort uint
|
ReadOnlyPort uint
|
||||||
@@ -869,7 +870,10 @@ func CreateAndInitKubelet(kc *KubeletConfig) (k KubeletBootstrap, pc *config.Pod
|
|||||||
KubeletEndpoint: api.DaemonEndpoint{Port: int(kc.Port)},
|
KubeletEndpoint: api.DaemonEndpoint{Port: int(kc.Port)},
|
||||||
}
|
}
|
||||||
|
|
||||||
pc = makePodSourceConfig(kc)
|
pc = kc.PodConfig
|
||||||
|
if pc == nil {
|
||||||
|
pc = makePodSourceConfig(kc)
|
||||||
|
}
|
||||||
k, err = kubelet.NewMainKubelet(
|
k, err = kubelet.NewMainKubelet(
|
||||||
kc.Hostname,
|
kc.Hostname,
|
||||||
kc.NodeName,
|
kc.NodeName,
|
||||||
|
|||||||
Reference in New Issue
Block a user