Skip to content

Commit

Permalink
fix: add --debug flag to helm command when running DevSpace with the …
Browse files Browse the repository at this point in the history
…--debug flag

Signed-off-by: Russell Centanni <[email protected]>
  • Loading branch information
lizardruss committed May 14, 2024
1 parent f29e897 commit 0ce83fa
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkg/devspace/helm/v3/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ func (c *client) InstallChart(ctx devspacecontext.Context, releaseName string, r
valuesFile,
"--install",
}

// Add debug flag
if ctx.Log().GetLevel() == logrus.DebugLevel {
args = append(args, "--debug")
}

if releaseNamespace != "" {
args = append(args, "--namespace", releaseNamespace)
}
Expand Down Expand Up @@ -118,6 +124,7 @@ func (c *client) InstallChart(ctx devspacecontext.Context, releaseName string, r
}
}
}

// Upgrade options
args = append(args, helmConfig.UpgradeArgs...)
output, err := c.genericHelm.Exec(ctx, args)
Expand Down Expand Up @@ -224,9 +231,11 @@ func (c *client) DeleteRelease(ctx devspacecontext.Context, releaseName string,
"delete",
releaseName,
}

if releaseNamespace != "" {
args = append(args, "--namespace", releaseNamespace)
}

_, err := c.genericHelm.Exec(ctx, args)
if err != nil {
return err
Expand Down

0 comments on commit 0ce83fa

Please sign in to comment.