Remove local-only resources at the last minute

This allows name references to them to be correctly resolved
This commit is contained in:
Katrina Verey
2022-11-29 18:49:54 -05:00
parent 832b552076
commit fb0f567b63
2 changed files with 120 additions and 4 deletions

View File

@@ -158,6 +158,11 @@ func (kt *KustTarget) makeCustomizedResMap() (resmap.ResMap, error) {
return nil, err
}
err = kt.IgnoreLocal(ra)
if err != nil {
return nil, err
}
return ra.ResMap(), nil
}
@@ -238,10 +243,6 @@ func (kt *KustTarget) accumulateTarget(ra *accumulator.ResAccumulator) (
return nil, errors.Wrapf(
err, "merging vars %v", kt.kustomization.Vars)
}
err = kt.IgnoreLocal(ra)
if err != nil {
return nil, err
}
return ra, nil
}