mirror of https://github.com/kubernetes/kops.git
Move task up so so it applies to all nodes
Add HOME=/root to kubelet sysconfig
This commit is contained in:
parent
7946f08a08
commit
bd779e7570
|
|
@ -146,6 +146,8 @@ func (b *KubeletBuilder) buildSystemdEnvironmentFile(kubeletConfig *kops.Kubelet
|
||||||
}
|
}
|
||||||
|
|
||||||
sysconfig := "DAEMON_ARGS=\"" + flags + "\"\n"
|
sysconfig := "DAEMON_ARGS=\"" + flags + "\"\n"
|
||||||
|
// Makes kubelet read /root/.docker/config.json properly
|
||||||
|
sysconfig = sysconfig + "HOME=\"/root" + "\"\n"
|
||||||
|
|
||||||
t := &nodetasks.File{
|
t := &nodetasks.File{
|
||||||
Path: "/etc/sysconfig/kubelet",
|
Path: "/etc/sysconfig/kubelet",
|
||||||
|
|
|
||||||
|
|
@ -70,21 +70,12 @@ func (b *SecretBuilder) Build(c *fi.ModelBuilderContext) error {
|
||||||
contents := string(dockercfg.Data)
|
contents := string(dockercfg.Data)
|
||||||
|
|
||||||
t := &nodetasks.File{
|
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"),
|
Path: filepath.Join("root", ".docker", "config.json"),
|
||||||
Contents: fi.NewStringResource(contents),
|
Contents: fi.NewStringResource(contents),
|
||||||
Type: nodetasks.FileType_File,
|
Type: nodetasks.FileType_File,
|
||||||
Mode: s("0600"),
|
Mode: s("0600"),
|
||||||
}
|
}
|
||||||
c.AddTask(t)
|
c.AddTask(t)
|
||||||
c.AddTask(t2)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// if we are not a master we can stop here
|
// if we are not a master we can stop here
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue