rename CachedResource to ClusterCachedResource#4281
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Pull request overview
This PR renames the cache.kcp.io API from CachedResource / CachedResourceEndpointSlice to ClusterCachedResource / ClusterCachedResourceEndpointSlice (including plural resources / REST paths), aligning naming with the fact that the API is cluster-scoped. It updates generated clients/informers/listers, controllers, tests, manifests, and documentation accordingly.
Changes:
- Rename cache API kinds/resources and update all controller and virtual-workspace wiring to the new names.
- Regenerate and update SDK clientsets, informers, listers, and applyconfigurations for the renamed types.
- Update docs, examples, bootstrap manifests, and e2e/integration tests to reference the new kinds/resources.
Reviewed changes
Copilot reviewed 120 out of 124 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/integration/dynamicrestmapper/dynamicrestmapper_test.go | Update RESTMapper resolution test to new EndpointSlice kind name |
| test/e2e/virtualresources/clustercachedresources/vr_clustercachedresources_test.go | Rename e2e test package and update API usage to ClusterCachedResource types |
| test/e2e/framework/util.go | Update helper to read endpoints from ClusterCachedResourceEndpointSlice status |
| test/e2e/cache/replication_api_cache_test.go | Update cache replication e2e tests to new typed clients/types and strings |
| test/e2e/cache/assets/published-resource-instances.yaml | Update asset kind to ClusterCachedResource |
| staging/src/github.com/kcp-dev/sdk/client/listers/cache/v1alpha1/expansion_generated.go | Rename lister expansion interfaces for new types |
| staging/src/github.com/kcp-dev/sdk/client/listers/cache/v1alpha1/clustercachedresourceendpointslice.go | Add lister for ClusterCachedResourceEndpointSlice |
| staging/src/github.com/kcp-dev/sdk/client/listers/cache/v1alpha1/clustercachedresource.go | Add lister for ClusterCachedResource |
| staging/src/github.com/kcp-dev/sdk/client/listers/cache/v1alpha1/cachedresourceendpointslice.go | Remove old CachedResourceEndpointSlice lister |
| staging/src/github.com/kcp-dev/sdk/client/listers/cache/v1alpha1/cachedresource.go | Remove old CachedResource lister |
| staging/src/github.com/kcp-dev/sdk/client/informers/externalversions/generic.go | Map new GVRs to new informers in generic informer factory |
| staging/src/github.com/kcp-dev/sdk/client/informers/externalversions/cache/v1alpha1/interface.go | Rename informer interfaces and constructors to Cluster* forms |
| staging/src/github.com/kcp-dev/sdk/client/clientset/versioned/typed/cache/v1alpha1/generated_expansion.go | Rename typed client expansion interfaces |
| staging/src/github.com/kcp-dev/sdk/client/clientset/versioned/typed/cache/v1alpha1/fake/fake_clustercachedresourceendpointslice.go | Add fake typed client for ClusterCachedResourceEndpointSlice |
| staging/src/github.com/kcp-dev/sdk/client/clientset/versioned/typed/cache/v1alpha1/fake/fake_clustercachedresource.go | Add fake typed client for ClusterCachedResource |
| staging/src/github.com/kcp-dev/sdk/client/clientset/versioned/typed/cache/v1alpha1/fake/fake_cachedresourceendpointslice.go | Remove old fake typed client for CachedResourceEndpointSlice |
| staging/src/github.com/kcp-dev/sdk/client/clientset/versioned/typed/cache/v1alpha1/fake/fake_cachedresource.go | Remove old fake typed client for CachedResource |
| staging/src/github.com/kcp-dev/sdk/client/clientset/versioned/typed/cache/v1alpha1/fake/fake_cache_client.go | Switch fake cache client getters to Cluster* methods |
| staging/src/github.com/kcp-dev/sdk/client/clientset/versioned/typed/cache/v1alpha1/clustercachedresourceendpointslice.go | Add typed client for ClusterCachedResourceEndpointSlice |
| staging/src/github.com/kcp-dev/sdk/client/clientset/versioned/typed/cache/v1alpha1/clustercachedresource.go | Add typed client for ClusterCachedResource |
| staging/src/github.com/kcp-dev/sdk/client/clientset/versioned/typed/cache/v1alpha1/cachedresourceendpointslice.go | Remove old typed client for CachedResourceEndpointSlice |
| staging/src/github.com/kcp-dev/sdk/client/clientset/versioned/typed/cache/v1alpha1/cachedresource.go | Remove old typed client for CachedResource |
| staging/src/github.com/kcp-dev/sdk/client/clientset/versioned/typed/cache/v1alpha1/cache_client.go | Switch real typed cache client getters to Cluster* methods |
| staging/src/github.com/kcp-dev/sdk/client/clientset/versioned/cluster/typed/cache/v1alpha1/generated_expansion.go | Rename cluster-typed client expansion interfaces |
| staging/src/github.com/kcp-dev/sdk/client/clientset/versioned/cluster/typed/cache/v1alpha1/fake/clustercachedresourceendpointslice.go | Add fake cluster-typed client for ClusterCachedResourceEndpointSlice |
| staging/src/github.com/kcp-dev/sdk/client/clientset/versioned/cluster/typed/cache/v1alpha1/fake/clustercachedresource.go | Add fake cluster-typed client for ClusterCachedResource |
| staging/src/github.com/kcp-dev/sdk/client/clientset/versioned/cluster/typed/cache/v1alpha1/fake/cachedresourceendpointslice.go | Remove old fake cluster-typed client for CachedResourceEndpointSlice |
| staging/src/github.com/kcp-dev/sdk/client/clientset/versioned/cluster/typed/cache/v1alpha1/fake/cachedresource.go | Remove old fake cluster-typed client for CachedResource |
| staging/src/github.com/kcp-dev/sdk/client/clientset/versioned/cluster/typed/cache/v1alpha1/fake/cache_client.go | Switch fake cluster cache client getters to Cluster* methods |
| staging/src/github.com/kcp-dev/sdk/client/clientset/versioned/cluster/typed/cache/v1alpha1/clustercachedresourceendpointslice.go | Add cluster-typed client for ClusterCachedResourceEndpointSlice |
| staging/src/github.com/kcp-dev/sdk/client/clientset/versioned/cluster/typed/cache/v1alpha1/clustercachedresource.go | Add cluster-typed client for ClusterCachedResource |
| staging/src/github.com/kcp-dev/sdk/client/clientset/versioned/cluster/typed/cache/v1alpha1/cachedresourceendpointslice.go | Remove old cluster-typed client for CachedResourceEndpointSlice |
| staging/src/github.com/kcp-dev/sdk/client/clientset/versioned/cluster/typed/cache/v1alpha1/cachedresource.go | Remove old cluster-typed client for CachedResource |
| staging/src/github.com/kcp-dev/sdk/client/clientset/versioned/cluster/typed/cache/v1alpha1/cache_client.go | Switch cluster-typed cache client getters to Cluster* methods |
| staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/utils.go | Update ForKind mappings to Cluster* kinds |
| staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/cache/v1alpha1/identity.go | Update Identity applyconfiguration doc text to ClusterCachedResource |
| staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/cache/v1alpha1/clustercachedresourcestatus.go | Rename status applyconfiguration type and update referenced enums |
| staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/cache/v1alpha1/clustercachedresourcespec.go | Rename spec applyconfiguration type/comments to ClusterCachedResource |
| staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/cache/v1alpha1/clustercachedresourcereference.go | Rename reference applyconfiguration type to ClusterCachedResourceReference |
| staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/cache/v1alpha1/clustercachedresourceendpointslicestatus.go | Rename EndpointSliceStatus applyconfiguration and endpoint list field |
| staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/cache/v1alpha1/clustercachedresourceendpointslicespec.go | Add ClusterCachedResourceEndpointSliceSpec applyconfiguration |
| staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/cache/v1alpha1/clustercachedresourceendpoint.go | Rename endpoint applyconfiguration type to ClusterCachedResourceEndpoint |
| staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/cache/v1alpha1/cachedresourceendpointslicespec.go | Remove old CachedResourceEndpointSliceSpec applyconfiguration |
| staging/src/github.com/kcp-dev/sdk/apis/cache/v1alpha1/zz_generated.model_name.go | Update OpenAPI model names to Cluster* types |
| staging/src/github.com/kcp-dev/sdk/apis/cache/v1alpha1/types_clustercachedresourceendpointslice.go | Rename EndpointSlice API types/fields/constants to Cluster* forms |
| staging/src/github.com/kcp-dev/sdk/apis/cache/v1alpha1/register.go | Register Cluster* types in scheme instead of old types |
| staging/src/github.com/kcp-dev/sdk/apis/cache/v1alpha1/helper/helper.go | Update helper to detect ClusterCachedResourceEndpointSlice virtual storage |
| staging/src/github.com/kcp-dev/sdk/apis/cache/register.go | Rename cache API constants to ClusterCachedResource* |
| pkg/virtual/replication/doc.go | Update replication VW docs to ClusterCachedResource terminology |
| pkg/virtual/replication/controllers/apireconciler/clustercachedresource_apireconciler_reconcile.go | Update API reconciler logic to ClusterCachedResource / ClusterCachedResourceEndpointSlice |
| pkg/virtual/replication/controllers/apireconciler/clustercachedresource_apireconciler_controller.go | Wire informers/indexers/queueing for ClusterCachedResourceEndpointSlice and ClusterCachedResource |
| pkg/virtual/replication/builder/wrap.go | Rename wrapper to operate on ClusterCachedResource and its shard annotations |
| pkg/virtual/replication/builder/forwarding.go | Provide read-only storage using ClusterCachedResource identity/version |
| pkg/virtual/replication/builder/build.go | Update VW build wiring and informer maps to clustercached* resources |
| pkg/virtual/replication/builder/build_test.go | Update digestURL tests for new endpoint-slice name segment |
| pkg/virtual/replication/authorizer/content.go | Update content authorizer to resolve ClusterCachedResourceEndpointSlice |
| pkg/server/server.go | Switch controller enablement and informer starts to clustercached* resources |
| pkg/server/config.go | Update comment to reference ClusterCachedResourceEndpointSlices |
| pkg/server/aggregatingcrdversiondiscovery/verbs_provider_virtualstorage.go | Update virtual storage kind matching to ClusterCachedResourceEndpointSlice |
| pkg/reconciler/cache/replication/replication_controller.go | Update replication controller indexer resource wiring to clustercached* resources |
| pkg/reconciler/cache/clustercachedresources/replication/replication_reconcile_unstructured.go | Add unstructured reconciliation helpers for ClusterCachedResources replication |
| pkg/reconciler/cache/clustercachedresources/replication/replication_controller.go | Update controller name/comments for ClusterCachedResources replication |
| pkg/reconciler/cache/clustercachedresources/README.md | Rename/readme updates for ClusterCachedResources controller |
| pkg/reconciler/cache/clustercachedresources/indexers.go | Update indexers to operate on ClusterCachedResource objects |
| pkg/reconciler/cache/clustercachedresources/clustercachedresources_reconcile.go | Switch reconciler pipeline to ClusterCachedResource |
| pkg/reconciler/cache/clustercachedresources/clustercachedresources_reconcile_schema.go | Update schema validation reconciler to ClusterCachedResource condition/type |
| pkg/reconciler/cache/clustercachedresources/clustercachedresources_reconcile_schema_test.go | Update schema reconciler unit tests to ClusterCachedResource |
| pkg/reconciler/cache/clustercachedresources/clustercachedresources_reconcile_replication.go | Switch child replication controller wiring to new package/name/types |
| pkg/reconciler/cache/clustercachedresources/clustercachedresources_reconcile_identity.go | Update identity reconciler to ClusterCachedResource and condition names |
| pkg/reconciler/cache/clustercachedresources/clustercachedresources_reconcile_checker.go | Update resource counter reconciler to ClusterCachedResource |
| pkg/reconciler/cache/clustercachedresources/clustercachedresources_reconcile_annotations.go | Update annotation reconciler docs/types to ClusterCachedResource |
| pkg/reconciler/cache/clustercachedresources/clustercachedresources_purge.go | Update purge reconciler to ClusterCachedResource |
| pkg/reconciler/cache/clustercachedresources/clustercachedresources_finalizer.go | Update finalizer reconciler to ClusterCachedResource phases/finalizer |
| pkg/reconciler/cache/clustercachedresources/clustercachedresources_finalizer_test.go | Update finalizer unit tests to ClusterCachedResource |
| pkg/reconciler/cache/clustercachedresources/clustercachedresources_controller.go | Update controller wiring/commit types/informer types to ClusterCachedResource |
| pkg/reconciler/cache/clustercachedresourceendpointsliceurls/clustercachedresourceendpointsliceurls_reconciler.go | Update URL reconciliation to patch ClusterCachedResourceEndpointSlice status endpoints |
| pkg/reconciler/cache/clustercachedresourceendpointslice/clustercachedresourceendpointslice_reconcile.go | Update EndpointSlice reconcile logic to ClusterCachedResource reference/conditions |
| pkg/reconciler/cache/clustercachedresourceendpointslice/clustercachedresourceendpointslice_indexers.go | Add indexers for ClusterCachedResourceEndpointSlice references/partition |
| pkg/reconciler/cache/cachedresourceendpointslice/cachedresourceendpointslice_indexers.go | Remove old CachedResourceEndpointSlice indexers |
| pkg/cache/server/server.go | Start ClusterCachedResource informer and update logging/sync checks |
| pkg/cache/server/config.go | Switch cache-server config wiring to clustercachedresources controller/indexers |
| pkg/cache/server/bootstrap/bootstrap.go | Update bootstrap API resources list to clustercached* |
| pkg/authorization/bootstrap/policy.go | Update RBAC rules to clustercachedresourceendpointslices resources |
| pkg/admission/plugins.go | Switch admission plugin import/registration to clustercachedresource plugin |
| pkg/admission/pathannotation/pathannotation_admission.go | Update path-annotation resource set to clustercachedresources |
| pkg/admission/pathannotation/pathannotation_admission_test.go | Update admission tests to ClusterCachedResource resource/type |
| docs/content/setup/production/overview.md | Update docs to mention ClusterCachedResourceEndpointSlice |
| docs/content/concepts/sharding/cache-server.md | Update sharding docs to clustercached* resources and API wording |
| docs/content/concepts/apis/exporting-apis.md | Update exporting docs to ClusterCachedResourceEndpointSlice and API name |
| config/system-crds/bootstrap.go | Update system CRD bootstrap resources to clustercached* |
| config/root-phase0/apiresourceschema-clustercachedresources.cache.kcp.io.yaml | Rename APIResourceSchema metadata/names/kinds/plurals to clustercachedresources |
| config/root-phase0/apiresourceschema-clustercachedresourceendpointslices.cache.kcp.io.yaml | Rename APIResourceSchema for EndpointSlices to clustercachedresourceendpointslices |
| config/root-phase0/apiexport-cache.kcp.io.yaml | Update bootstrap APIExport resources to clustercached* schemas |
| config/examples/virtualresources/README.md | Update example docs and file names to ClusterCachedResources |
| config/examples/virtualresources/cluster-cached-resource-instances.yaml | Update example kind to ClusterCachedResource |
| config/examples/virtualresources/cluster-cached-resource-instances-endpointslice.yaml | Update example kind/spec field to ClusterCachedResourceEndpointSlice / clusterCachedResource |
| config/examples/virtualresources/cluster-cached-resource-identity.yaml | Add example Secret for ClusterCachedResource identity |
| config/examples/virtualresources/apiexport.yaml | Update example APIExport virtual reference kind |
| config/crds/cache.kcp.io_clustercachedresources.yaml | Update CRD names/kinds/plurals/descriptions for clustercachedresources |
| config/crds/cache.kcp.io_clustercachedresourceendpointslices.yaml | Update CRD names/kinds/plurals/descriptions for clustercachedresourceendpointslices |
Comments suppressed due to low confidence (3)
staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/cache/v1alpha1/clustercachedresourcespec.go:39
- Typo in the identity comment: "when the ublishedResource is moved." has a missing "p" and double space, making the generated API docs harder to read. This string is also propagated into generated CRD/schema YAML; fixing the source text will keep generated docs consistent.
config/root-phase0/apiresourceschema-clustercachedresources.cache.kcp.io.yaml:64 - Typo in the schema description: "when the ublishedResource is moved." has a missing "p" and double space.
config/crds/cache.kcp.io_clustercachedresources.yaml:68 - Typo in the CRD schema description: "when the ublishedResource is moved." has a missing "p" and double space.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
6792b62 to
2b0f7bb
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 120 out of 124 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (3)
staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/cache/v1alpha1/clustercachedresourcespec.go:37
- Typo in comment: "ublishedResource" is missing the leading "p". This ends up in apply-configuration docs and generated OpenAPI descriptions.
config/crds/cache.kcp.io_clustercachedresources.yaml:66 - Typo in schema description: "ublishedResource" is missing the leading "p".
config/root-phase0/apiresourceschema-clustercachedresources.cache.kcp.io.yaml:62 - Typo in APIResourceSchema description: "ublishedResource" is missing the leading "p".
| } | ||
|
|
||
| slice, err := a.getCachedResourceEndpointSlice(apiDomianKey.Cluster, apiDomianKey.Name) | ||
| slice, err := a.getClusterCachedResourceEndpointSlice(apiDomianKey.Cluster, apiDomianKey.Name) |
There was a problem hiding this comment.
valid, but unrelated.
2b0f7bb to
5c8ac08
Compare
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
5c8ac08 to
17e4c2b
Compare
/retest |
Summary
the API is currently cluster scoped and should be reflected in the naming similarly to how k8s does it.
namespaced cached resources might be added eventually, but they require some planning.
What Type of PR Is This?
/kind api-change cleanup documentation
Related Issue(s)
Fixes #4278
Release Notes