update PruneString for resources

This commit is contained in:
Jingfang Liu
2019-04-18 10:39:22 -07:00
parent 867201a075
commit 748c88c276
4 changed files with 10 additions and 16 deletions

View File

@@ -89,7 +89,11 @@ func (r *Resource) Merge(other *Resource) {
}
func (r *Resource) PruneString() string {
return r.Id().PruneString()
namespace, _ := r.GetFieldValue("metadata.namespace")
return r.GetGvk().Group +
"_" + r.GetGvk().Kind +
"_" + namespace +
"_" + r.GetName()
}
// Replace performs replace with other resource.