add methods to convert resmap to&from rnodes

This commit is contained in:
Donny Xia
2020-11-13 13:36:18 -08:00
parent c7aaa18d0c
commit 536b69e5dc
5 changed files with 145 additions and 0 deletions

View File

@@ -10,6 +10,7 @@ import (
"sigs.k8s.io/kustomize/api/resid"
"sigs.k8s.io/kustomize/api/resource"
"sigs.k8s.io/kustomize/api/types"
"sigs.k8s.io/kustomize/kyaml/yaml"
)
// A Transformer modifies an instance of ResMap.
@@ -235,4 +236,8 @@ type ResMap interface {
// Select returns a list of resources that
// are selected by a Selector
Select(types.Selector) ([]*resource.Resource, error)
// ToRNodeSlice converts the resources in the resmp
// to a list of RNodes
ToRNodeSlice() ([]*yaml.RNode, error)
}