diff --git a/src/pepr/policies/common.ts b/src/pepr/policies/common.ts index fb7a91331..7945ef2aa 100644 --- a/src/pepr/policies/common.ts +++ b/src/pepr/policies/common.ts @@ -112,6 +112,9 @@ export function annotateMutation( const annotations = request.Raw.metadata?.annotations ?? {}; const valStr = annotations[key]; const arr = JSON.parse(valStr || "[]"); - arr.push(transform(policy)); + const safePolicyName = transform(policy); + if (!arr.includes(safePolicyName)) { + arr.push(safePolicyName); + } request.SetAnnotation(key, JSON.stringify(arr)); }