mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-30 01:46:23 +00:00
Introduce resmap.ApplyFilter.
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"sigs.k8s.io/kustomize/api/ifc"
|
||||
"sigs.k8s.io/kustomize/api/resource"
|
||||
"sigs.k8s.io/kustomize/api/types"
|
||||
"sigs.k8s.io/kustomize/kyaml/kio"
|
||||
"sigs.k8s.io/kustomize/kyaml/resid"
|
||||
"sigs.k8s.io/kustomize/kyaml/yaml"
|
||||
)
|
||||
@@ -173,7 +174,7 @@ type ResMap interface {
|
||||
// in the resid.DefaultNamespace entry.
|
||||
GroupedByCurrentNamespace() map[string][]*resource.Resource
|
||||
|
||||
// GroupByOrginalNamespace performs as GroupByNamespace
|
||||
// GroupedByOriginalNamespace performs as GroupByNamespace
|
||||
// but use the original namespace instead of the current
|
||||
// one to perform the grouping.
|
||||
GroupedByOriginalNamespace() map[string][]*resource.Resource
|
||||
@@ -253,4 +254,14 @@ type ResMap interface {
|
||||
|
||||
// RemoveBuildAnnotations removes annotations created by the build process.
|
||||
RemoveBuildAnnotations()
|
||||
|
||||
// ApplyFilter applies an RNode filter to all Resources in the ResMap.
|
||||
// TODO: Send/recover ancillary Resource data to/from subprocesses.
|
||||
// Assure that the ancillary data in Resource (everything not in the RNode)
|
||||
// is sent to and re-captured from transformer subprocess (as the process
|
||||
// might edit that information). One way to do this would be to solely use
|
||||
// RNode metadata annotation reading and writing instead of using Resource
|
||||
// struct data members, i.e. the Resource struct is replaced by RNode
|
||||
// and use of (slow) k8s metadata annotations inside the RNode.
|
||||
ApplyFilter(f kio.Filter) error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user