Merge pull request #4808 from larsks/feature/no-hooks

Add support for helm --no-hooks flag
This commit is contained in:
Kubernetes Prow Robot
2022-10-10 11:51:22 -07:00
committed by GitHub
4 changed files with 38 additions and 0 deletions

View File

@@ -282,6 +282,9 @@ func (p *HelmChartInflationGeneratorPlugin) templateCommand() []string {
if p.IncludeCRDs {
args = append(args, "--include-crds")
}
if p.SkipHooks {
args = append(args, "--no-hooks")
}
return args
}

View File

@@ -72,6 +72,10 @@ type HelmChart struct {
// IncludeCRDs specifies if Helm should also generate CustomResourceDefinitions.
// Defaults to 'false'.
IncludeCRDs bool `json:"includeCRDs,omitempty" yaml:"includeCRDs,omitempty"` //nolint: tagliatelle
// SkipHooks sets the --no-hooks flag when calling helm template. This prevents
// helm from erroneously rendering test templates.
SkipHooks bool `json:"skipHooks,omitempty" yaml:"skipHooks,omitempty"`
}
// HelmChartArgs contains arguments to helm.