mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-06-11 01:41:54 -04:00
Allow to override the pod config in CreateAndInitKubelet
This commit is contained in:
parent
2c03c04879
commit
df5e9f8a4d
1 changed files with 5 additions and 1 deletions
|
|
@ -826,6 +826,7 @@ type KubeletConfig struct {
|
|||
OOMAdjuster *oom.OOMAdjuster
|
||||
OSInterface kubecontainer.OSInterface
|
||||
PodCIDR string
|
||||
PodConfig *config.PodConfig
|
||||
PodInfraContainerImage string
|
||||
Port uint
|
||||
ReadOnlyPort uint
|
||||
|
|
@ -869,7 +870,10 @@ func CreateAndInitKubelet(kc *KubeletConfig) (k KubeletBootstrap, pc *config.Pod
|
|||
KubeletEndpoint: api.DaemonEndpoint{Port: int(kc.Port)},
|
||||
}
|
||||
|
||||
pc = makePodSourceConfig(kc)
|
||||
pc = kc.PodConfig
|
||||
if pc == nil {
|
||||
pc = makePodSourceConfig(kc)
|
||||
}
|
||||
k, err = kubelet.NewMainKubelet(
|
||||
kc.Hostname,
|
||||
kc.NodeName,
|
||||
|
|
|
|||
Loading…
Reference in a new issue