Skip to content

Commit

Permalink
Merge pull request devspace-sh#2855 from lizardruss/DSP-55
Browse files Browse the repository at this point in the history
fix: add --debug flag to helm command when running DevSpace with the …
  • Loading branch information
lizardruss authored May 15, 2024
2 parents 4a9f4fe + 0ce83fa commit 3212b31
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 3212b31

Please sign in to comment.