Skip to content

Commit

Permalink
Do not repeat the "downloading secrets" message for each secret being…
Browse files Browse the repository at this point in the history
… downloaded
  • Loading branch information
ereslibre committed Apr 12, 2019
1 parent c4a8588 commit 080427c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/caaspctl/actions/node/bootstrap/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@ func Bootstrap(bootstrapConfiguration deployments.BootstrapConfiguration, target
func downloadSecrets(target *deployments.Target) error {
os.MkdirAll(path.Join("pki", "etcd"), 0700)

fmt.Printf("[bootstrap] downloading secrets from bootstrapped node %q\n", target.Target)
for _, secretLocation := range deployments.Secrets {
secretData, err := target.DownloadFileContents(path.Join("/etc/kubernetes", secretLocation))
if err != nil {
return err
}
fmt.Println("[bootstrap] downloading secrets from new node")
if err := ioutil.WriteFile(secretLocation, []byte(secretData), 0600); err != nil {
return err
}
Expand Down

0 comments on commit 080427c

Please sign in to comment.