mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-03 11:06:57 +02:00
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:
+4
-1
@@ -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")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user