kcp-dev / code-generator

Generators for workspace-aware clientsets, informers, and listers
Apache License 2.0
4 stars 11 forks source link

:sparkles: single cluster informer factory #73

Closed stevekuznetsov closed 1 year ago

stevekuznetsov commented 1 year ago

listergen: add comments to interface methods

Signed-off-by: Steve Kuznetsov skuznets@redhat.com


listergen: add lister expansions

Signed-off-by: Steve Kuznetsov skuznets@redhat.com


listergen: document assumptions from indexer

Signed-off-by: Steve Kuznetsov skuznets@redhat.com


informergen,listergen: support a single-cluster-scoped informer factory

In some cases, users will want to run against a specific cluster in kcp, so we need to allow them to create a single-cluster-scoped factory. We can't extract the cluster they are in from the client we get passed without major hackery, so we use the standard shared informer, keyfunc and indices, simply leaving out the cluster entirely.

Signed-off-by: Steve Kuznetsov skuznets@redhat.com


examples: update generated code

Signed-off-by: Steve Kuznetsov skuznets@redhat.com


openshift-ci[bot] commented 1 year ago

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

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: - **[OWNERS](https://github.com/kcp-dev/code-generator/blob/main/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment