mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-11 00:52:55 +00:00
Refactored resource to store all previous names and namespaces
This commit is contained in:
@@ -241,7 +241,7 @@ func acceptAll(r *resource.Resource) bool {
|
||||
|
||||
func originalNameMatches(name string) sieveFunc {
|
||||
return func(r *resource.Resource) bool {
|
||||
return r.GetOriginalName() == name
|
||||
return r.OrgId().Name == name
|
||||
}
|
||||
}
|
||||
|
||||
@@ -304,7 +304,7 @@ func (f Filter) sameCurrentNamespaceAsReferrer() sieveFunc {
|
||||
|
||||
// selectReferral picks the best referral from a list of candidates.
|
||||
func (f Filter) selectReferral(
|
||||
// The name referral that may need to be updated.
|
||||
// The name referral that may need to be updated.
|
||||
oldName string,
|
||||
candidates []*resource.Resource) (*resource.Resource, error) {
|
||||
candidates = doSieve(candidates, originalNameMatches(oldName))
|
||||
|
||||
Reference in New Issue
Block a user