Skip to content

Commit 849fa5f

Browse files
committed
always add events to the claimed resources
On-behalf-of: @SAP [email protected]
1 parent f6134cc commit 849fa5f

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

internal/controller/apiexport/controller.go

Lines changed: 1 addition & 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[string]()
131+
claimedResources := sets.New("events")
132132

133133
// PublishedResources use kinds, but the PermissionClaims use resource names (plural),
134134
// so we must translate accordingly

test/utils/fixtures.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,16 @@ func BindToAPIExport(t *testing.T, ctx context.Context, client ctrlruntimeclient
258258
},
259259
State: kcpapisv1alpha1.ClaimAccepted,
260260
},
261+
{
262+
PermissionClaim: kcpapisv1alpha1.PermissionClaim{
263+
GroupResource: kcpapisv1alpha1.GroupResource{
264+
Group: "",
265+
Resource: "events",
266+
},
267+
All: true,
268+
},
269+
State: kcpapisv1alpha1.ClaimAccepted,
270+
},
261271
// for related resources, the agent can also sync ConfigMaps and Secrets
262272
{
263273
PermissionClaim: kcpapisv1alpha1.PermissionClaim{

0 commit comments

Comments
 (0)