Remove util and privatize selectByGvk

This commit is contained in:
Jeffrey Regan
2018-06-01 14:17:56 -07:00
parent 57f3743be8
commit d0c6a824c8
8 changed files with 11 additions and 15 deletions

View File

@@ -21,7 +21,6 @@ import (
"fmt"
"github.com/kubernetes-sigs/kustomize/pkg/resmap"
"github.com/kubernetes-sigs/kustomize/pkg/types"
"k8s.io/apimachinery/pkg/runtime/schema"
)
@@ -57,7 +56,7 @@ func (o *nameReferenceTransformer) Transform(
objMap := obj.UnstructuredContent()
for _, referencePathConfig := range o.pathConfigs {
for _, path := range referencePathConfig.pathConfigs {
if !types.SelectByGVK(id.Gvk(), path.GroupVersionKind) {
if !selectByGVK(id.Gvk(), path.GroupVersionKind) {
continue
}
err := mutateField(objMap, path.Path, path.CreateIfNotPresent,
@@ -82,7 +81,7 @@ func (o *nameReferenceTransformer) updateNameReference(
}
for id, obj := range m {
if !types.SelectByGVK(id.Gvk(), &GVK) {
if !selectByGVK(id.Gvk(), &GVK) {
continue
}
if id.Name() == s {