Skip to content

Commit

Permalink
Only patch OLM events RBAC if patch verb is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
simu committed Sep 20, 2024
1 parent a164ebd commit af7fcf1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion component/olm.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -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' ],
}
Expand Down

0 comments on commit af7fcf1

Please sign in to comment.