Skip to content

Commit

Permalink
Move PullFromApis() to the parent command
Browse files Browse the repository at this point in the history
  • Loading branch information
ojmhetar committed Feb 7, 2019
1 parent 8d0f33e commit 0c497e4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions cmd/secret.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ var secretCmdCreate = &cobra.Command{
if err != nil {
log.Fatalf("Unable to create secrets: %v", err)
}
if err = state.PullFromAPIs(); err != nil {
log.Fatalf("unable to sync on-disk state: %v", err)
}
log.Println("Secrets created successfully.")
},
}
Expand Down Expand Up @@ -59,10 +62,6 @@ func createSecretDefaults() error {
if _, err := state.KubeClient.CoreV1().Secrets(common.DefaultNamespace).Create(newBootstrapTokenSecret); err != nil {
return fmt.Errorf("unable to create bootstrap token secret: %v", err)
}
if err := state.PullFromAPIs(); err != nil {
return fmt.Errorf("unable to sync on-disk state: %v", err)
}

return nil
}

Expand Down

0 comments on commit 0c497e4

Please sign in to comment.