Skip to content

Commit

Permalink
feat(helm): Add support for --no-hooks switch in Helm template (#545)
Browse files Browse the repository at this point in the history
  • Loading branch information
PatTheSilent authored Mar 30, 2021
1 parent 8040711 commit 1e4d1dd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/helm/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ type TemplateOpts struct {
IncludeCRDs bool
// Namespace scope for this request
Namespace string
// NoHooks specifies whether hooks should be excluded from the template output
NoHooks bool
}

// Flags returns all options apart from Values as their respective `helm
Expand All @@ -85,6 +87,10 @@ func (t TemplateOpts) Flags() []string {
flags = append(flags, "--include-crds")
}

if t.NoHooks {
flags = append(flags, "--no-hooks")
}

if t.Namespace != "" {
flags = append(flags, "--namespace="+t.Namespace)
}
Expand Down

0 comments on commit 1e4d1dd

Please sign in to comment.