mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-10 08:20:59 +00:00
fix the bug for setting annotations when triggering transformers
This commit is contained in:
@@ -208,12 +208,10 @@ func (p *ExecPlugin) getResMapWithIdAnnotation(rm resmap.ResMap) (resmap.ResMap,
|
||||
}
|
||||
annotations := r.GetAnnotations()
|
||||
if annotations == nil {
|
||||
annotations = map[string]string{
|
||||
idAnnotation: string(idString),
|
||||
}
|
||||
r.SetAnnotations(annotations)
|
||||
annotations = make(map[string]string)
|
||||
}
|
||||
annotations[idAnnotation] = string(idString)
|
||||
r.SetAnnotations(annotations)
|
||||
}
|
||||
return inputRM, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user