mirror of
https://github.com/kyverno/kyverno.git
synced 2025-01-20 18:52:16 +00:00
fix: annotation path (#3547)
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com> Co-authored-by: shuting <shuting@nirmata.com>
This commit is contained in:
parent
2f81c77850
commit
e716daa22e
1 changed files with 1 additions and 1 deletions
|
@ -51,7 +51,7 @@ func generateAnnotationPatches(engineResponses []*response.EngineResponse, log l
|
|||
if _, ok := annotations[strings.ReplaceAll(policyAnnotation, "~1", "/")]; ok {
|
||||
// create update patch string
|
||||
if _, ok := annotations["policies.kyverno.io/patches"]; ok {
|
||||
patchResponse = jsonutils.NewPatch("/metadata/annotations/policies.kyverno.io/patches", "remove", nil)
|
||||
patchResponse = jsonutils.NewPatch("/metadata/annotations/"+oldAnnotation, "remove", nil)
|
||||
delete(annotations, "policies.kyverno.io/patches")
|
||||
patchByte, _ := json.Marshal(patchResponse)
|
||||
patchBytes = append(patchBytes, patchByte)
|
||||
|
|
Loading…
Add table
Reference in a new issue