Skip to content

Commit d0f4796

Browse files
authored
Merge pull request #4281 from neolit123/4278-rename-cachedresource
rename CachedResource to ClusterCachedResource
2 parents c8f4183 + 1bf85f7 commit d0f4796

123 files changed

Lines changed: 2761 additions & 2747 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

config/crds/cache.kcp.io_cachedresourceendpointslices.yaml renamed to config/crds/cache.kcp.io_clustercachedresourceendpointslices.yaml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,30 @@ kind: CustomResourceDefinition
44
metadata:
55
annotations:
66
controller-gen.kubebuilder.io/version: v0.17.3
7-
name: cachedresourceendpointslices.cache.kcp.io
7+
name: clustercachedresourceendpointslices.cache.kcp.io
88
spec:
99
group: cache.kcp.io
1010
names:
1111
categories:
1212
- kcp
13-
kind: CachedResourceEndpointSlice
14-
listKind: CachedResourceEndpointSliceList
15-
plural: cachedresourceendpointslices
16-
singular: cachedresourceendpointslice
13+
kind: ClusterCachedResourceEndpointSlice
14+
listKind: ClusterCachedResourceEndpointSliceList
15+
plural: clustercachedresourceendpointslices
16+
singular: clustercachedresourceendpointslice
1717
scope: Cluster
1818
versions:
1919
- additionalPrinterColumns:
20-
- jsonPath: .spec.cachedResource.name
21-
name: CachedResource
20+
- jsonPath: .spec.clusterCachedResource.name
21+
name: ClusterCachedResource
2222
type: string
2323
- jsonPath: .metadata.creationTimestamp
2424
name: Age
2525
type: date
2626
name: v1alpha1
2727
schema:
2828
openAPIV3Schema:
29-
description: CachedResourceEndpointSlice is a sink for the endpoints of CachedResource
30-
virtual workspaces.
29+
description: ClusterCachedResourceEndpointSlice is a sink for the endpoints
30+
of ClusterCachedResource virtual workspaces.
3131
properties:
3232
apiVersion:
3333
description: |-
@@ -49,30 +49,30 @@ spec:
4949
spec:
5050
description: |-
5151
spec holds the desired state:
52-
- the targeted CachedResource
52+
- the targeted ClusterCachedResource
5353
properties:
54-
cachedResource:
55-
description: CachedResource points to the real CachedResource the
56-
slice is created for.
54+
clusterCachedResource:
55+
description: ClusterCachedResource points to the real ClusterCachedResource
56+
the slice is created for.
5757
properties:
5858
name:
59-
description: name is the name of the CachedResource the reference
60-
points to.
59+
description: name is the name of the ClusterCachedResource the
60+
reference points to.
6161
type: string
6262
path:
6363
description: |-
64-
path is a logical cluster path where the CachedResource is defined. If empty,
65-
the CachedResource is assumed to be co-located with the referencing resource.
64+
path is a logical cluster path where the ClusterCachedResource is defined. If empty,
65+
the ClusterCachedResource is assumed to be co-located with the referencing resource.
6666
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(:[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
6767
type: string
6868
required:
6969
- name
7070
type: object
7171
x-kubernetes-validations:
72-
- message: CachedResource reference must not be changed
72+
- message: ClusterCachedResource reference must not be changed
7373
rule: self == oldSelf
7474
export:
75-
description: export points to the APIExport that exports this CachedResourceEndpointSlice.
75+
description: export points to the APIExport that exports this ClusterCachedResourceEndpointSlice.
7676
properties:
7777
name:
7878
description: name is the name of the APIExport that describes
@@ -93,10 +93,10 @@ spec:
9393
partition:
9494
description: |-
9595
partition points to a partition that is used for filtering the endpoints
96-
of the CachedResource part of the slice.
96+
of the ClusterCachedResource part of the slice.
9797
type: string
9898
required:
99-
- cachedResource
99+
- clusterCachedResource
100100
- export
101101
type: object
102102
status:
@@ -106,7 +106,7 @@ spec:
106106
properties:
107107
conditions:
108108
description: conditions is a list of conditions that apply to the
109-
CachedResourceEndpointSlice.
109+
ClusterCachedResourceEndpointSlice.
110110
items:
111111
description: Condition defines an observation of a object operational
112112
state.

config/crds/cache.kcp.io_cachedresources.yaml renamed to config/crds/cache.kcp.io_clustercachedresources.yaml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ kind: CustomResourceDefinition
44
metadata:
55
annotations:
66
controller-gen.kubebuilder.io/version: v0.17.3
7-
name: cachedresources.cache.kcp.io
7+
name: clustercachedresources.cache.kcp.io
88
spec:
99
group: cache.kcp.io
1010
names:
1111
categories:
1212
- kcp
13-
kind: CachedResource
14-
listKind: CachedResourceList
15-
plural: cachedresources
16-
singular: cachedresource
13+
kind: ClusterCachedResource
14+
listKind: ClusterCachedResourceList
15+
plural: clustercachedresources
16+
singular: clustercachedresource
1717
scope: Cluster
1818
versions:
1919
- additionalPrinterColumns:
@@ -27,8 +27,8 @@ spec:
2727
name: v1alpha1
2828
schema:
2929
openAPIV3Schema:
30-
description: CachedResource defines a resource that should be published to
31-
other workspaces
30+
description: ClusterCachedResource defines a resource that should be published
31+
to other workspaces
3232
properties:
3333
apiVersion:
3434
description: |-
@@ -48,7 +48,7 @@ spec:
4848
metadata:
4949
type: object
5050
spec:
51-
description: CachedResourceSpec defines the desired state of CachedResource.
51+
description: ClusterCachedResourceSpec defines the desired state of ClusterCachedResource.
5252
properties:
5353
group:
5454
description: |-
@@ -59,13 +59,13 @@ spec:
5959
identity:
6060
description: |-
6161
identity points to a secret that contains the API identity in the 'key' file.
62-
The API identity allows access to CachedResource's resources via the APIExport.
62+
The API identity allows access to ClusterCachedResource's resources via the APIExport.
6363
64-
Different CachedResource in a workspace can share a common identity, or have different
64+
Different ClusterCachedResource in a workspace can share a common identity, or have different
6565
ones. The identity (the secret) can also be transferred to another workspace
6666
when the ublishedResource is moved.
6767
68-
The identity is defaulted. A secret with the name of the CachedResource is automatically
68+
The identity is defaulted. A secret with the name of the ClusterCachedResource is automatically
6969
created.
7070
properties:
7171
secretRef:
@@ -144,7 +144,8 @@ spec:
144144
- resource
145145
type: object
146146
status:
147-
description: CachedResourceStatus defines the observed state of CachedResource.
147+
description: ClusterCachedResourceStatus defines the observed state of
148+
ClusterCachedResource.
148149
properties:
149150
conditions:
150151
description: Current processing state of the Workspace.

config/examples/virtualresources/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# VirtualResources Example
22

3-
This example shows usage of virtual resources, together with CachedResources.
4-
The goal of CachedResources is to distribute static, read-only resources to multiple clusters
3+
This example shows usage of virtual resources, together with ClusterCachedResources.
4+
The goal of ClusterCachedResources is to distribute static, read-only resources to multiple clusters
55
in a scalable way.
66

77
## Setup
@@ -23,9 +23,9 @@ in a scalable way.
2323
kubectl create -f config/examples/virtualresources/apiresourceschema-instances.yaml
2424
kubectl create -f config/examples/virtualresources/instances.yaml
2525

26-
# create caching for the resources with a pre-made CachedResources identity
27-
kubectl create -f config/examples/virtualresources/cached-resource-identity.yaml
28-
kubectl create -f config/examples/virtualresources/cached-resource-instances.yaml
26+
# create caching for the resources with a pre-made ClusterCachedResources identity
27+
kubectl create -f config/examples/virtualresources/cluster-cached-resource-identity.yaml
28+
kubectl create -f config/examples/virtualresources/cluster-cached-resource-instances.yaml
2929
```
3030

3131
3. Create an APIResourceSchema for actual virtual machines to be distributed,
@@ -35,11 +35,11 @@ in a scalable way.
3535
kubectl create -f config/examples/virtualresources/apiresourceschema-virtualmachine.yaml
3636
```
3737

38-
4. Create an APIExport for the virtual machines and the CachedResourceEndpointSlice that references it:
38+
4. Create an APIExport for the virtual machines and the ClusterCachedResourceEndpointSlice that references it:
3939

4040
```bash
4141
kubectl create -f config/examples/virtualresources/apiexport.yaml
42-
kubectl create -f config/examples/virtualresources/cached-resource-instances-endpointslice.yaml
42+
kubectl create -f config/examples/virtualresources/cluster-cached-resource-instances-endpointslice.yaml
4343
```
4444

4545
5. Create a consumer workspace, where we will consume the virtual machines:

config/examples/virtualresources/apiexport.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ spec:
1111
virtual:
1212
reference:
1313
apiGroup: cache.kcp.io
14-
kind: CachedResourceEndpointSlice
14+
kind: ClusterCachedResourceEndpointSlice
1515
name: instances
1616
identityHash: 676a1a997f7507fdfcfd1fcf35920efdff1297cd215cad4f486220c30a5c7090
1717
- name: virtualmachines

config/examples/virtualresources/cached-resource-identity.yaml renamed to config/examples/virtualresources/cluster-cached-resource-identity.yaml

File renamed without changes.

config/examples/virtualresources/cached-resource-instances-endpointslice.yaml renamed to config/examples/virtualresources/cluster-cached-resource-instances-endpointslice.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
apiVersion: cache.kcp.io/v1alpha1
2-
kind: CachedResourceEndpointSlice
2+
kind: ClusterCachedResourceEndpointSlice
33
metadata:
44
name: instances
55
spec:
6-
cachedResource:
6+
clusterCachedResource:
77
name: instances
88
export:
99
name: virtualmachines

config/examples/virtualresources/cached-resource-instances.yaml renamed to config/examples/virtualresources/cluster-cached-resource-instances.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apiVersion: cache.kcp.io/v1alpha1
2-
kind: CachedResource
2+
kind: ClusterCachedResource
33
metadata:
44
name: instances
55
spec:

config/root-phase0/apiexport-cache.kcp.io.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ metadata:
55
spec:
66
resources:
77
- group: cache.kcp.io
8-
name: cachedresourceendpointslices
9-
schema: v260803-cc772d08b.cachedresourceendpointslices.cache.kcp.io
8+
name: clustercachedresourceendpointslices
9+
schema: v260804-b35f3bb61.clustercachedresourceendpointslices.cache.kcp.io
1010
storage:
1111
crd: {}
1212
- group: cache.kcp.io
13-
name: cachedresources
14-
schema: v250920-de0c8484d.cachedresources.cache.kcp.io
13+
name: clustercachedresources
14+
schema: v250920-de0c8484d.clustercachedresources.cache.kcp.io
1515
storage:
1616
crd: {}
1717
status: {}

config/root-phase0/apiresourceschema-cachedresourceendpointslices.cache.kcp.io.yaml renamed to config/root-phase0/apiresourceschema-clustercachedresourceendpointslices.cache.kcp.io.yaml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
apiVersion: apis.kcp.io/v1alpha1
22
kind: APIResourceSchema
33
metadata:
4-
name: v260803-cc772d08b.cachedresourceendpointslices.cache.kcp.io
4+
name: v260804-b35f3bb61.clustercachedresourceendpointslices.cache.kcp.io
55
spec:
66
group: cache.kcp.io
77
names:
88
categories:
99
- kcp
10-
kind: CachedResourceEndpointSlice
11-
listKind: CachedResourceEndpointSliceList
12-
plural: cachedresourceendpointslices
13-
singular: cachedresourceendpointslice
10+
kind: ClusterCachedResourceEndpointSlice
11+
listKind: ClusterCachedResourceEndpointSliceList
12+
plural: clustercachedresourceendpointslices
13+
singular: clustercachedresourceendpointslice
1414
scope: Cluster
1515
versions:
1616
- additionalPrinterColumns:
17-
- jsonPath: .spec.cachedResource.name
18-
name: CachedResource
17+
- jsonPath: .spec.clusterCachedResource.name
18+
name: ClusterCachedResource
1919
type: string
2020
- jsonPath: .metadata.creationTimestamp
2121
name: Age
2222
type: date
2323
name: v1alpha1
2424
schema:
25-
description: CachedResourceEndpointSlice is a sink for the endpoints of CachedResource
26-
virtual workspaces.
25+
description: ClusterCachedResourceEndpointSlice is a sink for the endpoints
26+
of ClusterCachedResource virtual workspaces.
2727
properties:
2828
apiVersion:
2929
description: |-
@@ -45,30 +45,30 @@ spec:
4545
spec:
4646
description: |-
4747
spec holds the desired state:
48-
- the targeted CachedResource
48+
- the targeted ClusterCachedResource
4949
properties:
50-
cachedResource:
51-
description: CachedResource points to the real CachedResource the slice
52-
is created for.
50+
clusterCachedResource:
51+
description: ClusterCachedResource points to the real ClusterCachedResource
52+
the slice is created for.
5353
properties:
5454
name:
55-
description: name is the name of the CachedResource the reference
55+
description: name is the name of the ClusterCachedResource the reference
5656
points to.
5757
type: string
5858
path:
5959
description: |-
60-
path is a logical cluster path where the CachedResource is defined. If empty,
61-
the CachedResource is assumed to be co-located with the referencing resource.
60+
path is a logical cluster path where the ClusterCachedResource is defined. If empty,
61+
the ClusterCachedResource is assumed to be co-located with the referencing resource.
6262
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(:[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
6363
type: string
6464
required:
6565
- name
6666
type: object
6767
x-kubernetes-validations:
68-
- message: CachedResource reference must not be changed
68+
- message: ClusterCachedResource reference must not be changed
6969
rule: self == oldSelf
7070
export:
71-
description: export points to the APIExport that exports this CachedResourceEndpointSlice.
71+
description: export points to the APIExport that exports this ClusterCachedResourceEndpointSlice.
7272
properties:
7373
name:
7474
description: name is the name of the APIExport that describes the
@@ -89,10 +89,10 @@ spec:
8989
partition:
9090
description: |-
9191
partition points to a partition that is used for filtering the endpoints
92-
of the CachedResource part of the slice.
92+
of the ClusterCachedResource part of the slice.
9393
type: string
9494
required:
95-
- cachedResource
95+
- clusterCachedResource
9696
- export
9797
type: object
9898
status:
@@ -101,7 +101,7 @@ spec:
101101
the filtered list of endpoints for the Replication service.
102102
properties:
103103
conditions:
104-
description: conditions is a list of conditions that apply to the CachedResourceEndpointSlice.
104+
description: conditions is a list of conditions that apply to the ClusterCachedResourceEndpointSlice.
105105
items:
106106
description: Condition defines an observation of a object operational
107107
state.

0 commit comments

Comments
 (0)