marcincuber 3 years ago
parent
commit
5fe3b2d810
3 changed files with 4 additions and 4 deletions
  1. 1 1
      go.mod
  2. 2 2
      pkg/template/v2/template.go
  3. 1 1
      pkg/template/v2/yaml.go

+ 1 - 1
go.mod

@@ -101,6 +101,7 @@ require (
 	github.com/fluxcd/helm-controller/api v0.22.0
 	github.com/fluxcd/pkg/apis/meta v0.14.1
 	github.com/fluxcd/source-controller/api v0.24.1
+	sigs.k8s.io/yaml v1.3.0
 )
 
 require (
@@ -297,5 +298,4 @@ require (
 	sigs.k8s.io/kustomize/api v0.10.1 // indirect
 	sigs.k8s.io/kustomize/kyaml v0.13.0 // indirect
 	sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
-	sigs.k8s.io/yaml v1.3.0 // indirect
 )

+ 2 - 2
pkg/template/v2/template.go

@@ -33,8 +33,8 @@ var tplFuncs = tpl.FuncMap{
 	"jwkPublicKeyPem":  jwkPublicKeyPem,
 	"jwkPrivateKeyPem": jwkPrivateKeyPem,
 
-	"toYaml":        toYAML,
-	"fromYaml":      fromYAML,
+	"toYaml":   toYAML,
+	"fromYaml": fromYAML,
 }
 
 // So other templating calls can use the same extra functions.

+ 1 - 1
pkg/template/v2/yaml.go

@@ -45,4 +45,4 @@ func fromYAML(str string) map[string]interface{} {
 		m["Error"] = err.Error()
 	}
 	return m
-}
+}