Skip to content

Commit 0cb1d0c

Browse files
Merge pull request #135 from projectsyn/fix/olm-permissions
Fix OLM permissions for L2 Announcements
2 parents 9005d9f + 613556f commit 0cb1d0c

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

component/olm.jsonnet

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,13 @@ local metadata_name_map = {
6969
CiliumConfig: 'cilium',
7070
Deployment: 'cilium-olm',
7171
OlmRole: 'cilium-olm',
72+
OlmClusterRole: 'cilium-cilium-olm',
7273
},
7374
enterprise: {
7475
CiliumConfig: 'cilium-enterprise',
7576
Deployment: 'cilium-ee-olm',
7677
OlmRole: 'cilium-ee-olm',
78+
OlmClusterRole: 'cilium-cilium-ee-olm',
7779
},
7880
};
7981

@@ -210,6 +212,19 @@ local patchManifests = function(file, has_csv)
210212
],
211213
},
212214
}
215+
else if (
216+
file.contents.kind == 'ClusterRole' &&
217+
file.contents.metadata.name == metadata_name_map[params.release].OlmClusterRole
218+
) then
219+
file {
220+
contents+: {
221+
rules+: [ {
222+
apiGroups: [ 'coordination.k8s.io' ],
223+
resources: [ 'leases' ],
224+
verbs: [ 'create', 'get', 'update', 'list', 'delete' ],
225+
} ],
226+
},
227+
}
213228
else
214229
file;
215230

tests/golden/olm-opensource/cilium/cilium/olm/cluster-network-06-cilium-00008-cilium-cilium-olm-clusterrole.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,13 @@ rules:
3333
verbs:
3434
- patch
3535
- update
36+
- apiGroups:
37+
- coordination.k8s.io
38+
resources:
39+
- leases
40+
verbs:
41+
- create
42+
- get
43+
- update
44+
- list
45+
- delete

0 commit comments

Comments
 (0)