Refactored resource to store all previous names and namespaces

This commit is contained in:
Natasha Sarkar
2021-02-01 14:50:20 -08:00
parent 6246262965
commit f71854a0c8
23 changed files with 376 additions and 442 deletions

View File

@@ -31,9 +31,7 @@ func (p *ReplicaCountTransformerPlugin) Transform(m resmap.ResMap) error {
found := false
for _, fs := range p.FieldSpecs {
matcher := p.createMatcher(fs)
matchOriginal := m.GetMatchingResourcesByOriginalId(matcher)
resList := append(
matchOriginal, m.GetMatchingResourcesByCurrentId(matcher)...)
resList := m.GetMatchingResourcesByAnyId(matcher)
if len(resList) > 0 {
found = true
for _, r := range resList {