Switch namespace and patch transformers to kyaml.

This commit is contained in:
jregan
2020-06-27 14:24:12 -07:00
parent 42d1f7b792
commit d3a7335bbc
18 changed files with 234 additions and 81 deletions

View File

@@ -5,6 +5,7 @@ package builtins
import (
"fmt"
"strings"
jsonpatch "github.com/evanphx/json-patch"
"github.com/pkg/errors"
@@ -34,6 +35,11 @@ func (p *PatchJson6902TransformerPlugin) Config(
if err != nil {
return err
}
if !strings.Contains(string(c), "yamlSupport") {
// If not explicitly denied,
// activate kyaml-based transformation.
p.YAMLSupport = true
}
if p.Target.Name == "" {
return fmt.Errorf("must specify the target name")
}