Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: force vault port forward on failure #623

Merged
merged 1 commit into from
Oct 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions cmd/createUtils.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,14 @@ func loopUntilPodIsReady(dryRun bool) {
res, err := http.DefaultClient.Do(req)
if err != nil {
log.Println("error with http request Do, vault is not available", err)
// todo: temporary code
log.Println("trying to open port-forward again...")
go func() {
_, err := k8s.PortForward(false, "vault", "svc/vault", "8200:8200")
if err != nil {
log.Println("error opening Vault port forward")
}
}()
continue
}

Expand Down
2 changes: 0 additions & 2 deletions cmd/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@ var localCmd = &cobra.Command{
RunE: func(cmd *cobra.Command, args []string) error {

initFlags := initCmd.Flags()
//err := initFlags.Set("gitops-branch", "main")
err := initFlags.Set("gitops-branch", "main")
if err != nil {
return err
}
//viper.Set("gitops.branch", "main")
viper.Set("gitops.branch", "main")

err = initFlags.Set("metaphor-branch", "main")
Expand Down