mirror of https://github.com/kubernetes/kops.git
Don't error if the dockerconfig isn't present
This commit is contained in:
parent
4f95fe473f
commit
e093702fc3
|
|
@ -60,19 +60,17 @@ func (b *SecretBuilder) Build(c *fi.ModelBuilderContext) error {
|
||||||
|
|
||||||
if b.SecretStore != nil {
|
if b.SecretStore != nil {
|
||||||
key := "dockerconfig"
|
key := "dockerconfig"
|
||||||
dockercfg, err := b.SecretStore.Secret(key)
|
dockercfg, _ := b.SecretStore.Secret(key)
|
||||||
if err != nil {
|
if dockercfg != nil {
|
||||||
return err
|
contents := string(dockercfg.Data)
|
||||||
|
t := &nodetasks.File{
|
||||||
|
Path: filepath.Join("root", ".docker", "config.json"),
|
||||||
|
Contents: fi.NewStringResource(contents),
|
||||||
|
Type: nodetasks.FileType_File,
|
||||||
|
Mode: s("0600"),
|
||||||
|
}
|
||||||
|
c.AddTask(t)
|
||||||
}
|
}
|
||||||
contents := string(dockercfg.Data)
|
|
||||||
|
|
||||||
t := &nodetasks.File{
|
|
||||||
Path: filepath.Join("root", ".docker", "config.json"),
|
|
||||||
Contents: fi.NewStringResource(contents),
|
|
||||||
Type: nodetasks.FileType_File,
|
|
||||||
Mode: s("0600"),
|
|
||||||
}
|
|
||||||
c.AddTask(t)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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