Skip to content

Commit 3c1d4f5

Browse files
committed
fix permission claim logic
On-behalf-of: @SAP [email protected]
1 parent 27e822c commit 3c1d4f5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

internal/controller/apiexport/controller.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ func (r *Reconciler) reconcile(ctx context.Context) error {
128128

129129
// for each PR, we note down the created ARS and also the GVKs of related resources
130130
arsList := sets.New[string]()
131-
claimedResources := sets.New("events")
131+
claimedResources := sets.New[string]()
132132

133133
// PublishedResources use kinds, but the PermissionClaims use resource names (plural),
134134
// so we must translate accordingly
@@ -160,6 +160,9 @@ func (r *Reconciler) reconcile(ctx context.Context) error {
160160
claimedResources.Insert("namespaces")
161161
}
162162

163+
// We always want to create events.
164+
claimedResources.Insert("events")
165+
163166
if arsList.Len() == 0 {
164167
r.log.Debug("No ready PublishedResources available.")
165168
return nil

0 commit comments

Comments
 (0)