Skip to content

Commit

Permalink
Merge pull request #10093 from olemarkus/automated-cherry-pick-of-#10…
Browse files Browse the repository at this point in the history
…092-origin-release-1.19

Automated cherry pick of #10092: Fix circular dependency in tasks related to kubelet
  • Loading branch information
k8s-ci-robot authored Oct 24, 2020
2 parents 876c239 + 879b445 commit 41bc556
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
18 changes: 10 additions & 8 deletions nodeup/pkg/model/kubelet.go
Original file line number Diff line number Diff line change
Expand Up @@ -566,17 +566,19 @@ func (b *KubeletBuilder) buildKubeletServingCertificate(c *fi.ModelBuilderContex
cert, key := b.GetBootstrapCert(name)

c.AddTask(&nodetasks.File{
Path: filepath.Join(dir, name+".crt"),
Contents: cert,
Type: nodetasks.FileType_File,
Mode: fi.String("0644"),
Path: filepath.Join(dir, name+".crt"),
Contents: cert,
Type: nodetasks.FileType_File,
Mode: fi.String("0644"),
BeforeServices: []string{"kubelet.service"},
})

c.AddTask(&nodetasks.File{
Path: filepath.Join(dir, name+".key"),
Contents: key,
Type: nodetasks.FileType_File,
Mode: fi.String("0400"),
Path: filepath.Join(dir, name+".key"),
Contents: key,
Type: nodetasks.FileType_File,
Mode: fi.String("0400"),
BeforeServices: []string{"kubelet.service"},
})

} else {
Expand Down
18 changes: 10 additions & 8 deletions nodeup/pkg/model/networking/cilium.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,17 +131,19 @@ func (b *CiliumBuilder) buildCiliumEtcdSecrets(c *fi.ModelBuilderContext) error
cert, key := b.GetBootstrapCert(name)

c.AddTask(&nodetasks.File{
Path: filepath.Join(dir, name+".crt"),
Contents: cert,
Type: nodetasks.FileType_File,
Mode: fi.String("0644"),
Path: filepath.Join(dir, name+".crt"),
Contents: cert,
Type: nodetasks.FileType_File,
Mode: fi.String("0644"),
BeforeServices: []string{"kubelet.service"},
})

c.AddTask(&nodetasks.File{
Path: filepath.Join(dir, name+".key"),
Contents: key,
Type: nodetasks.FileType_File,
Mode: fi.String("0400"),
Path: filepath.Join(dir, name+".key"),
Contents: key,
Type: nodetasks.FileType_File,
Mode: fi.String("0400"),
BeforeServices: []string{"kubelet.service"},
})

return b.BuildCertificateTask(c, signer, filepath.Join(dir, "etcd-ca.crt"), nil)
Expand Down

0 comments on commit 41bc556

Please sign in to comment.