Move task up so so it applies to all nodes

Add HOME=/root to kubelet sysconfig
This commit is contained in:
Blake 2017-07-29 00:29:10 -07:00
parent 7946f08a08
commit bd779e7570
3 changed files with 5 additions and 12 deletions

View File

@ -146,6 +146,8 @@ func (b *KubeletBuilder) buildSystemdEnvironmentFile(kubeletConfig *kops.Kubelet
}
sysconfig := "DAEMON_ARGS=\"" + flags + "\"\n"
// Makes kubelet read /root/.docker/config.json properly
sysconfig = sysconfig + "HOME=\"/root" + "\"\n"
t := &nodetasks.File{
Path: "/etc/sysconfig/kubelet",

View File

@ -70,21 +70,12 @@ func (b *SecretBuilder) Build(c *fi.ModelBuilderContext) error {
contents := string(dockercfg.Data)
t := &nodetasks.File{
Path: filepath.Join(
"var", "lib", "kubelet", ".docker", "config.json"),
Contents: fi.NewStringResource(contents),
Type: nodetasks.FileType_File,
Mode: s("0600"),
}
t2 := &nodetasks.File{
Path: filepath.Join("root", ".docker", "config.json"),
Contents: fi.NewStringResource(contents),
Type: nodetasks.FileType_File,
Mode: s("0600"),
}
c.AddTask(t)
c.AddTask(t2)
}
// if we are not a master we can stop here