fix for the patchdelete test

This commit is contained in:
Natasha Sarkar
2020-09-28 13:28:06 -07:00
parent e17bab7e55
commit f5feffbd23
2 changed files with 8 additions and 4 deletions

View File

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