From af7fcf18921c8dad764188919418d105016e2a5b Mon Sep 17 00:00:00 2001 From: Simon Gerber Date: Fri, 20 Sep 2024 13:39:50 +0200 Subject: [PATCH] Only patch OLM `events` RBAC if `patch` verb is missing --- component/olm.jsonnet | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/component/olm.jsonnet b/component/olm.jsonnet index 0955841f..f97507ff 100644 --- a/component/olm.jsonnet +++ b/component/olm.jsonnet @@ -202,7 +202,11 @@ local patchManifests = function(file, has_csv) file { contents+: { rules: [ - if r.apiGroups == [ '' ] && r.resources == [ 'events' ] then + if + r.apiGroups == [ '' ] + && r.resources == [ 'events' ] + && !std.member(r.verbs, 'patch') + then r { verbs+: [ 'patch' ], }