Skip to content

Commit

Permalink
Fix circular dependency in tasks related to cilium certs
Browse files Browse the repository at this point in the history
  • Loading branch information
Ole Markus With committed Oct 24, 2020
1 parent 4aae530 commit 879b445
Showing 1 changed file with 10 additions and 8 deletions.
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 879b445

Please sign in to comment.