Skip to content

Commit

Permalink
Merge branch 'main' into 797-decompose-istio-oscal-into-oscal-and-val…
Browse files Browse the repository at this point in the history
…idations
  • Loading branch information
CloudBeard authored Oct 17, 2024
2 parents 306d254 + 99d1c83 commit 231c081
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pepr/policies/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ export function annotateMutation<T extends KubernetesObject>(
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));
}

0 comments on commit 231c081

Please sign in to comment.