Hide unstructured.Unstructured behind interface.

This commit is contained in:
jregan
2018-10-06 10:44:34 -07:00
committed by Jeffrey Regan
parent 9c8302b2d2
commit 0f5a39f328
35 changed files with 527 additions and 419 deletions

View File

@@ -85,7 +85,7 @@ func (o *namespaceTransformer) Transform(m resmap.ResMap) error {
}
for id := range mf {
objMap := mf[id].UnstructuredContent()
objMap := mf[id].Map()
for _, path := range o.pathConfigs {
if !id.Gvk().IsSelected(&path.Gvk) {
continue
@@ -118,7 +118,7 @@ func (o *namespaceTransformer) updateClusterRoleBinding(m resmap.ResMap) {
if id.Gvk().Kind != "ClusterRoleBinding" && id.Gvk().Kind != "RoleBinding" {
continue
}
objMap := m[id].UnstructuredContent()
objMap := m[id].Map()
subjects := objMap["subjects"].([]interface{})
for i := range subjects {
subject := subjects[i].(map[string]interface{})