From afe82f6453a9a7ac4debcfa4043a733aeddc9af5 Mon Sep 17 00:00:00 2001 From: Chris Mellard Date: Sun, 13 Dec 2020 13:57:35 +1300 Subject: [PATCH] chore: suppress empty values on serializing several helmfile values (#1616) --- pkg/state/state.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/state/state.go b/pkg/state/state.go index 77249a53..fc7d0f94 100644 --- a/pkg/state/state.go +++ b/pkg/state/state.go @@ -70,7 +70,7 @@ type ReleaseSetSpec struct { // If set to "Error", return an error when a subhelmfile points to a // non-existent path. The default behavior is to print a warning. Note the // differing default compared to other MissingFileHandlers. - MissingFileHandler string `yaml:"missingFileHandler"` + MissingFileHandler string `yaml:"missingFileHandler,omitempty"` } // HelmState structure for the helmfile @@ -284,12 +284,12 @@ type ReleaseSpec struct { // This is only needed when you can't FIX your chart to have `namespace: {{ .Namespace }}` AND you're using `helmfile template`. // In standard use-cases, `Namespace` should be sufficient. // Use this only when you know what you want to do! - ForceNamespace string `yaml:"forceNamespace"` + ForceNamespace string `yaml:"forceNamespace,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. - SkipDeps *bool `yaml:"skipDeps"` + SkipDeps *bool `yaml:"skipDeps,omitempty"` } type Release struct {