Skip to content

Commit

Permalink
Workaround to make helm (v3) template to render crds
Browse files Browse the repository at this point in the history
  • Loading branch information
databus23 committed Oct 25, 2019
1 parent 977b5c8 commit cd5743f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions cmd/helm3.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,13 @@ func (d *diffCmd) template() ([]byte, error) {
}
}

//This is a workaround until https://github.com/helm/helm/pull/6729 is released
for _, apiVersion := range strings.Split(os.Getenv("HELM_TEMPLATE_API_VERSIONS"), ",") {
if apiVersion != "" {
flags = append(flags, "--api-versions", strings.TrimSpace(apiVersion))
}
}

args := []string{"template", d.release, d.chart}
args = append(args, flags...)
cmd := exec.Command(os.Getenv("HELM_BIN"), args...)
Expand Down
2 changes: 1 addition & 1 deletion plugin.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: "diff"
# Version is the version of Helm plus the number of official builds for this
# plugin
version: "3.0.0-rc.3"
version: "3.0.0-rc.4"
usage: "Preview helm upgrade changes as a diff"
description: "Preview helm upgrade changes as a diff"
useTunnel: true
Expand Down

0 comments on commit cd5743f

Please sign in to comment.