Introduce gvk package to isolate apimachinery schema.

This commit is contained in:
Jeffrey Regan
2018-09-25 16:57:31 -07:00
parent 8aa0cc145c
commit fb355eb320
38 changed files with 570 additions and 477 deletions

View File

@@ -59,7 +59,7 @@ func (o *mapTransformer) Transform(m resmap.ResMap) error {
for id := range m {
objMap := m[id].UnstructuredContent()
for _, path := range o.pathConfigs {
if !selectByGVK(id.Gvk(), path.GroupVersionKind) {
if !id.Gvk().IsSelected(path.GroupVersionKind) {
continue
}
err := mutateField(objMap, path.Path, path.CreateIfNotPresent, o.addMap)