Skip to content

Comments

fix inherited APIBinding not inheriting default permission claim selector#3786

Open
olamilekan000 wants to merge 1 commit intokcp-dev:mainfrom
olamilekan000:fix-resource-selctor-not0being-inherited
Open

fix inherited APIBinding not inheriting default permission claim selector#3786
olamilekan000 wants to merge 1 commit intokcp-dev:mainfrom
olamilekan000:fix-resource-selctor-not0being-inherited

Conversation

@olamilekan000
Copy link
Contributor

@olamilekan000 olamilekan000 commented Jan 14, 2026

Summary

change fixes how permission claim selectors are inherited from parent 
APIBindings instead of always defaulting to matchAll: true when creating inherited APIBindings
in child workspaces.
image

What Type of PR Is This?

/kind bug

Related Issue(s)

Fixes 3779

Release Notes

Fixed Inherited APIBindings now inherit permission claim selectors from parent workspaces instead of defaulting to matchAll: true.

@kcp-ci-bot kcp-ci-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has signed the DCO. kind/bug Categorizes issue or PR as related to a bug. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jan 14, 2026
@olamilekan000 olamilekan000 changed the title fix inherited APIBinding Selector not inheriting default permission claim selector fix inherited APIBinding not inheriting default permission claim selector Jan 14, 2026
@olamilekan000
Copy link
Contributor Author

/retest

3 similar comments
@olamilekan000
Copy link
Contributor Author

/retest

@olamilekan000
Copy link
Contributor Author

/retest

@olamilekan000
Copy link
Contributor Author

/retest

@olamilekan000 olamilekan000 force-pushed the fix-resource-selctor-not0being-inherited branch from fec326a to 1a0d605 Compare January 15, 2026 12:27
@olamilekan000
Copy link
Contributor Author

/retest

@olamilekan000 olamilekan000 force-pushed the fix-resource-selctor-not0being-inherited branch 2 times, most recently from 4766801 to 34d26b9 Compare January 15, 2026 18:19
@olamilekan000
Copy link
Contributor Author

/retest

@olamilekan000
Copy link
Contributor Author

/test

@kcp-ci-bot
Copy link
Contributor

@olamilekan000: The /test command needs one or more targets.
The following commands are available to trigger required jobs:

/build-image
/test pull-kcp-build-image
/test pull-kcp-lint
/test pull-kcp-test-e2e
/test pull-kcp-test-e2e-multiple-runs
/test pull-kcp-test-e2e-sharded
/test pull-kcp-test-e2e-shared
/test pull-kcp-test-integration
/test pull-kcp-test-unit
/test pull-kcp-validate-prow-yaml
/test pull-kcp-verify
/test pull-kcp-verify-codegen

Use /test all to run the following jobs that were automatically triggered:

pull-kcp-build-image
pull-kcp-lint
pull-kcp-test-e2e
pull-kcp-test-e2e-multiple-runs
pull-kcp-test-e2e-sharded
pull-kcp-test-e2e-shared
pull-kcp-test-integration
pull-kcp-test-unit
pull-kcp-validate-prow-yaml
pull-kcp-verify
pull-kcp-verify-codegen
Details

In response to this:

/test

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@olamilekan000
Copy link
Contributor Author

/retest

1 similar comment
@olamilekan000
Copy link
Contributor Author

/retest

@olamilekan000 olamilekan000 force-pushed the fix-resource-selctor-not0being-inherited branch from 34d26b9 to cfb0e0e Compare January 18, 2026 18:39
@olamilekan000
Copy link
Contributor Author

/retest

@olamilekan000 olamilekan000 force-pushed the fix-resource-selctor-not0being-inherited branch from cfb0e0e to e139340 Compare January 19, 2026 06:03
@kcp-ci-bot kcp-ci-bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jan 19, 2026
@mjudeikis
Copy link
Contributor

/retest

Copy link
Contributor

@mjudeikis mjudeikis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have feeling this might fail in sharded setup. Did you tested this with sharded api server?

return logicalClusterInformer.Lister().Cluster(clusterName).Get(corev1alpha1.LogicalClusterName)
},
getLogicalClusterByPath: func(path logicalcluster.Path) (*corev1alpha1.LogicalCluster, error) {
clusters, err := indexers.ByIndex[*corev1alpha1.LogicalCluster](logicalClustersInformer.Informer().GetIndexer(), indexers.ByLogicalClusterPath, path.String())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will consult with local shard only. If logicalcluster lives on different shard, this should fail.

Is this not the case? We should be using fallback informers?

Copy link
Contributor Author

@olamilekan000 olamilekan000 Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't test this with a shard setup but my intention here was to fetch a cluster using the path . By the way, the shard tests are passing, I guess everything's good.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

im not sure sharding tests are testing this. And if both workspaces land on the same shard, it would pass. So failure would be transiant

Copy link
Contributor

@mjudeikis mjudeikis Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs to be WithFallback to be able to resolve clusters frm other shards. If parent is located on other shard this will fail.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does WithFallback mean in this case?
ps: I am actually trying to carryout a manual test with a shard setup, but havn't really had time to

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fallback takes 2 informers: the local shard and the cache server.
If the object is not found in the local shard informer, it goes to the cache server.
So cross-shard operation objects need to be replicated to the cache server so other shards can "consult" them.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't forget, but thanks for the Ping

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you kindly review once more @mjudeikis

@olamilekan000 olamilekan000 force-pushed the fix-resource-selctor-not0being-inherited branch from e139340 to 9fd8aa4 Compare January 19, 2026 11:48
@kcp-ci-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from mjudeikis. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@olamilekan000
Copy link
Contributor Author

/retest

2 similar comments
@olamilekan000
Copy link
Contributor Author

/retest

@olamilekan000
Copy link
Contributor Author

/retest

@mjudeikis
Copy link
Contributor

/test all

@olamilekan000
Copy link
Contributor Author

/retest

2 similar comments
@olamilekan000
Copy link
Contributor Author

/retest

@olamilekan000
Copy link
Contributor Author

/retest

@olamilekan000 olamilekan000 force-pushed the fix-resource-selctor-not0being-inherited branch from 9fd8aa4 to c46f724 Compare January 22, 2026 02:51
@olamilekan000
Copy link
Contributor Author

/retest

Copy link
Contributor

@mjudeikis mjudeikis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a question, but lgtm

…laim

Signed-off-by: olalekan odukoya <odukoyaonline@gmail.com>
@olamilekan000 olamilekan000 force-pushed the fix-resource-selctor-not0being-inherited branch from c46f724 to 68d93c3 Compare February 21, 2026 03:02
@olamilekan000
Copy link
Contributor Author

/retest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. kind/bug Categorizes issue or PR as related to a bug. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: ResourceSelector isn't inherited by the default APIBindings mechanism

3 participants