feat: Add option for SkipCRDs to HelmDefaults (#2356)

* feat: Add option for SkipCRDs to HelmDefaults

Signed-off-by: Manetheren <git@manetheren.io>

* fix: nil check not needed on bool

Signed-off-by: Manetheren <git@manetheren.io>

* Fix typo

Signed-off-by: Manetheren <git@manetheren.io>

---------

Signed-off-by: Manetheren <git@manetheren.io>
This commit is contained in:
Manetheren 2026-01-22 01:32:04 -07:00 committed by GitHub
parent 63f589016a
commit 7500eef7c6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -187,6 +187,9 @@ type HelmSpec struct {
HistoryMax *int `yaml:"historyMax,omitempty"`
// CreateNamespace, when set to true (default), --create-namespace is passed to helm on install/upgrade
CreateNamespace *bool `yaml:"createNamespace,omitempty"`
// SkipCRDs passes the --skip-crds flag to helm upgrade --install to ensure any CRDs contained in the crds/
// subdirectory of a helm chart are not automatically applied with every helmfile sync or apply
SkipCRDs bool `yaml:"skipCRDs,omitempty"`
// SkipDeps disables running `helm dependency up` and `helm dependency build` on this release's chart.
// This is relevant only when your release uses a local chart or a directory containing K8s manifests or a Kustomization
// as a Helm chart.
@ -758,7 +761,7 @@ func (st *HelmState) prepareSyncReleases(helm helmexec.Interface, additionalValu
}
}
if opts.SkipCRDs {
if st.HelmDefaults.SkipCRDs || opts.SkipCRDs {
flags = append(flags, "--skip-crds")
}