Skip to content
This repository was archived by the owner on Dec 31, 2025. It is now read-only.

Commit 0c497e4

Browse files
committed
Move PullFromApis() to the parent command
1 parent 8d0f33e commit 0c497e4

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

cmd/secret.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ var secretCmdCreate = &cobra.Command{
1717
if err != nil {
1818
log.Fatalf("Unable to create secrets: %v", err)
1919
}
20+
if err = state.PullFromAPIs(); err != nil {
21+
log.Fatalf("unable to sync on-disk state: %v", err)
22+
}
2023
log.Println("Secrets created successfully.")
2124
},
2225
}
@@ -59,10 +62,6 @@ func createSecretDefaults() error {
5962
if _, err := state.KubeClient.CoreV1().Secrets(common.DefaultNamespace).Create(newBootstrapTokenSecret); err != nil {
6063
return fmt.Errorf("unable to create bootstrap token secret: %v", err)
6164
}
62-
if err := state.PullFromAPIs(); err != nil {
63-
return fmt.Errorf("unable to sync on-disk state: %v", err)
64-
}
65-
6665
return nil
6766
}
6867

0 commit comments

Comments
 (0)