mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-12 01:14:22 +00:00
kyaml/fn/framework ensures the annotation output format matches the input
If the input only contains legacy format anntations (path, index, id), the output will be the same.
This commit is contained in:
@@ -116,8 +116,21 @@ func Execute(p ResourceListProcessor, rlSource *kio.ByteReadWriter) error {
|
||||
}
|
||||
rl.FunctionConfig = rlSource.FunctionConfig
|
||||
|
||||
// We store the original
|
||||
nodeAnnos, err := kio.StoreInternalAnnotations(rl.Items)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
retErr := p.Process(&rl)
|
||||
|
||||
// If either the internal annotations for path, index, and id OR the legacy
|
||||
// annotations for path, index, and id are changed, we have to update the other.
|
||||
err = kio.ReconcileInternalAnnotations(rl.Items, nodeAnnos)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Write the results
|
||||
// Set the ResourceList.results for validating functions
|
||||
if len(rl.Results) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user