changed way to test for empty resource

This commit is contained in:
Natasha Sarkar
2020-09-29 17:33:12 -07:00
parent f5feffbd23
commit c93274c224
2 changed files with 2 additions and 2 deletions

View File

@@ -147,7 +147,7 @@ func (p *plugin) applySMPatch(resource, patch *resource.Resource) error {
err = filtersutil.ApplyToJSON(patchstrategicmerge.Filter{
Patch: node,
}, resource)
if resource.GetName() != "" {
if len(resource.Map()) != 0 {
resource.SetName(n)
resource.SetNamespace(ns)
}