Skip to content

✨ Add .WithCluster and .WithNamespace #48

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 6, 2025

Conversation

ntnn
Copy link
Member

@ntnn ntnn commented Jun 30, 2025

Summary

Will be needed for a PR in code-generator.

I'd remove the NewNamespaced in a later iteration.
The NewNamespaced is actually fine, the problem is the with this pattern two NewClustered would exist. So it is easier to use a method.
Alternatively it'd turn in NewResourceClsuterIndexer(...) and NewResourceIndexerWithCluster

Also marking as WIP as I want to see if we can reduce to just ResourceIndexer.
Edit: Yeah that comes with a whole bunch of other things. Maybe in the future.

Required for this PR: kcp-dev/code-generator#112
To produce this code: https://github.com/ntnn/kcp-client-go/blob/6da9f49cb6ae465ade077a00666498890b21005a/listers/core/v1/resourcequota.go#L32-L116

Related issue(s)

Related: #47

@kcp-ci-bot kcp-ci-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. dco-signoff: yes Indicates the PR's author has signed the DCO. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 30, 2025
@ntnn ntnn changed the title [WIP] ✨ Add cluster-aware versions of gentype and listers [WIP] ✨ Add .Cluster and .Namespace Jun 30, 2025
@ntnn ntnn changed the title [WIP] ✨ Add .Cluster and .Namespace ✨ Add .Cluster and .Namespace Jun 30, 2025
@kcp-ci-bot kcp-ci-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 30, 2025
@ntnn ntnn force-pushed the update-code-gen-third_party branch from 8458363 to 09a93ab Compare July 1, 2025 07:49
@kcp-ci-bot kcp-ci-bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 1, 2025
@ntnn ntnn changed the title ✨ Add .Cluster and .Namespace [WIP] ✨ Add .Cluster and .Namespace Jul 1, 2025
@kcp-ci-bot kcp-ci-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 1, 2025
@ntnn ntnn force-pushed the update-code-gen-third_party branch from 09a93ab to 678b79a Compare July 1, 2025 09:46
@kcp-ci-bot kcp-ci-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 1, 2025
@ntnn ntnn changed the title [WIP] ✨ Add .Cluster and .Namespace ✨ Add .WithCluster and .WithNamespace Jul 1, 2025
@kcp-ci-bot kcp-ci-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 1, 2025
@mjudeikis
Copy link
Contributor

/lgtm
/approve

@kcp-ci-bot kcp-ci-bot added the lgtm Indicates that a PR is ready to be merged. label Jul 6, 2025
@kcp-ci-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 7a6c2655ae724abc2fc05f9ec8876a703e93c3c5

@kcp-ci-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mjudeikis

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

The pull request process is described here

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

@kcp-ci-bot kcp-ci-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 6, 2025
@kcp-ci-bot kcp-ci-bot merged commit de95389 into kcp-dev:kcp-1.32.3 Jul 6, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has signed the DCO. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants