Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

Commit

Permalink
marshal boolstrings like 'no' with quotes in helm values file
Browse files Browse the repository at this point in the history
  • Loading branch information
laverya committed Feb 11, 2020
1 parent 5d4ba5e commit c3db24e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion pkg/helm/shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import (

"github.com/Masterminds/sprig/v3"
"github.com/replicatedhq/ship/pkg/constants"
"github.com/replicatedhq/ship/pkg/util"
"google.golang.org/grpc/status"
yaml "gopkg.in/yaml.v3"
"k8s.io/helm/pkg/getter"
Expand Down Expand Up @@ -140,7 +141,7 @@ func vals(valueFiles valueFiles, values []string, stringValues []string, fileVal
}
}

return yaml.Marshal(base)
return util.MarshalIndent(2, base)
}

func generateName(nameTemplate string) (string, error) {
Expand Down
3 changes: 1 addition & 2 deletions pkg/patch/patcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
"github.com/go-kit/kit/log/level"
"github.com/pkg/errors"
"github.com/spf13/afero"
yamlv3 "gopkg.in/yaml.v3"
"k8s.io/apimachinery/pkg/util/strategicpatch"
"k8s.io/client-go/kubernetes/scheme"
kustomizepatch "sigs.k8s.io/kustomize/pkg/patch"
Expand Down Expand Up @@ -186,7 +185,7 @@ func (p *ShipPatcher) ApplyPatch(patch []byte, step api.Kustomize, resource stri
PatchesStrategicMerge: []kustomizepatch.StrategicMerge{TempYamlPath},
}

kustomizationYamlBytes, err := yamlv3.Marshal(kustomizationYaml)
kustomizationYamlBytes, err := util.MarshalIndent(2, kustomizationYaml)
if err != nil {
return nil, errors.Wrap(err, "marshal kustomization yaml")
}
Expand Down

0 comments on commit c3db24e

Please sign in to comment.