Run defaulting on the scheduler startup

This commit is contained in:
Clayton Coleman
2016-09-30 17:39:47 -04:00
parent 3ee591d7ab
commit 957c0955aa
6 changed files with 13 additions and 3 deletions

View File

@@ -64,8 +64,10 @@ type KubeletServer struct {
// NewKubeletServer will create a new KubeletServer with default values.
func NewKubeletServer() *KubeletServer {
versioned := &v1alpha1.KubeletConfiguration{}
api.Scheme.Default(versioned)
config := componentconfig.KubeletConfiguration{}
api.Scheme.Convert(&v1alpha1.KubeletConfiguration{}, &config, nil)
api.Scheme.Convert(versioned, &config, nil)
return &KubeletServer{
KubeConfig: flag.NewStringFlag("/var/lib/kubelet/kubeconfig"),
RequireKubeConfig: false, // in 1.5, default to true