Fix review comments

This commit is contained in:
Alan Clucas 2023-02-27 13:49:41 +00:00
parent 939c540298
commit ac1e3f4bd1

View file

@ -27,7 +27,6 @@ import (
"github.com/magefile/mage/sh"
yamlpath "github.com/vmware-labs/yaml-jsonpath/pkg/yamlpath"
"gopkg.in/yaml.v3"
"io/ioutil"
"os"
"strings"
)
@ -150,10 +149,9 @@ func updateChartValue(key, value string) {
var b bytes.Buffer
yamlEncoder := yaml.NewEncoder(&b)
yamlEncoder.SetIndent(2)
yamlEncoder.Encode(&n)
err = yamlEncoder.Encode(&n)
CheckIfError(err, "HELM Could not Marshal new Values file")
err = ioutil.WriteFile(HelmChartValues, b.Bytes(), 0644)
err = os.WriteFile(HelmChartValues, b.Bytes(), 0644)
CheckIfError(err, "HELM Could not write new Values file to %s", HelmChartValues)
Info("HELM Ingress Nginx Helm Chart update %s %s", key, value)