Skip to content

Commit

Permalink
Update ClusterClaim to v1alpha2
Browse files Browse the repository at this point in the history
1. ClusterClaim upgraded to v1alpha2, with removing the Name of it

2. metadata.name in ClusterClaim can only be `id.k8s.io` or
   `clusterset.k8s.io`

3. Deprecate ClusterClaim version v1alpha1

Signed-off-by: zbangqi <[email protected]>
  • Loading branch information
zbangqi committed Jun 21, 2022
1 parent b2c245c commit 62be426
Show file tree
Hide file tree
Showing 53 changed files with 720 additions and 509 deletions.
14 changes: 11 additions & 3 deletions docs/multicluster/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,29 @@ used by Antrea Multi-cluster are in the API group `multicluster.crd.antrea.io`,
two CRDs from [mcs-api](https://github.com/kubernetes-sigs/mcs-api) are in group `multicluster.x-k8s.io`
which is defined by Kubernetes upstream [KEP-1645](https://github.com/kubernetes/enhancements/tree/master/keps/sig-multicluster/1645-multi-cluster-services-api).

## CRDs in `multicluster.crd.antrea.io`
## Currently-supported

### CRDs in `multicluster.crd.antrea.io`

| CRD | CRD version | Introduced in | Deprecated in / Planned Deprecation | Planned Removal |
| ------------------------ | ----------- | ------------- | ----------------------------------- | --------------- |
| `ClusterClaims` | v1alpha1 | v1.5.0 | N/A | N/A |
| `ClusterClaims` | v1alpha2 | v1.8.0 | N/A | N/A |
| `ClusterSets` | v1alpha1 | v1.5.0 | N/A | N/A |
| `MemberClusterAnnounces` | v1alpha1 | v1.5.0 | N/A | N/A |
| `ResourceExports` | v1alpha1 | v1.5.0 | N/A | N/A |
| `ResourceImports` | v1alpha1 | v1.5.0 | N/A | N/A |
| `Gateway` | v1alpha1 | v1.7.0 | N/A | N/A |
| `ClusterInfoImport` | v1alpha1 | v1.7.0 | N/A | N/A |

## CRDs in `multicluster.x-k8s.io`
### CRDs in `multicluster.x-k8s.io`

| CRD | CRD version | Introduced in | Deprecated in / Planned Deprecation | Planned Removal |
| ---------------- | ----------- | ------------- | ----------------------------------- | --------------- |
| `ServiceExports` | v1alpha1 | v1.5.0 | N/A | N/A |
| `ServiceImports` | v1alpha1 | v1.5.0 | N/A | N/A |

## Previously-supported

| CRD | API group | CRD version | Introduced in | Deprecated in | Removed in |
| ------------------------ | ---------------------------- | ----------- | ------------- | ------------- | ---------- |
| `ClusterClaims` | `multicluster.crd.antrea.io` | v1alpha1 | v1.5.0 | v1.8.0 | v1.8.0 |
22 changes: 7 additions & 15 deletions docs/multicluster/user-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,20 +203,18 @@ with the following YAML manifest (you can also refer to
[multicluster_membercluster_template.yaml](../../multicluster/config/samples/clusterset_init/multicluster_membercluster_template.yaml)):

```yaml
apiVersion: multicluster.crd.antrea.io/v1alpha1
apiVersion: multicluster.crd.antrea.io/v1alpha2
kind: ClusterClaim
metadata:
name: id.k8s.io
namespace: kube-system
name: id.k8s.io
value: test-cluster-east
---
apiVersion: multicluster.crd.antrea.io/v1alpha1
apiVersion: multicluster.crd.antrea.io/v1alpha2
kind: ClusterClaim
metadata:
name: clusterset.k8s.io
namespace: kube-system
name: clusterset.k8s.io
value: test-clusterset
---
apiVersion: multicluster.crd.antrea.io/v1alpha1
Expand Down Expand Up @@ -245,15 +243,13 @@ kind: ClusterClaim
metadata:
name: id.k8s.io
namespace: kube-system
name: id.k8s.io
value: test-cluster-west
---
apiVersion: multicluster.crd.antrea.io/v1alpha1
apiVersion: multicluster.crd.antrea.io/v1alpha2
kind: ClusterClaim
metadata:
name: clusterset.k8s.io
namespace: kube-system
name: clusterset.k8s.io
value: test-clusterset
---
apiVersion: multicluster.crd.antrea.io/v1alpha1
Expand All @@ -276,20 +272,18 @@ spec:
[multicluster_clusterset_template.yaml](../../multicluster/config/samples/clusterset_init/multicluster_clusterset_template.yaml)):

```yaml
apiVersion: multicluster.crd.antrea.io/v1alpha1
apiVersion: multicluster.crd.antrea.io/v1alpha2
kind: ClusterClaim
metadata:
name: id.k8s.io
namespace: antrea-multicluster
name: id.k8s.io
value: test-cluster-north
---
apiVersion: multicluster.crd.antrea.io/v1alpha1
apiVersion: multicluster.crd.antrea.io/v1alpha2
kind: ClusterClaim
metadata:
name: clusterset.k8s.io
namespace: antrea-multicluster
name: clusterset.k8s.io
value: test-clusterset
---
apiVersion: multicluster.crd.antrea.io/v1alpha1
Expand Down Expand Up @@ -324,20 +318,18 @@ Then create the `ClusterClaim` and `ClusterSet` CRs in cluster
Multi-cluster Controller runs):

```yaml
apiVersion: multicluster.crd.antrea.io/v1alpha1
apiVersion: multicluster.crd.antrea.io/v1alpha2
kind: ClusterClaim
metadata:
name: id.k8s.io
namespace: kube-system
name: id.k8s.io
value: test-cluster-north
---
apiVersion: multicluster.crd.antrea.io/v1alpha1
apiVersion: multicluster.crd.antrea.io/v1alpha2
kind: ClusterClaim
metadata:
name: clusterset.k8s.io
namespace: kube-system
name: clusterset.k8s.io
value: test-clusterset
---
apiVersion: multicluster.crd.antrea.io/v1alpha1
Expand Down
22 changes: 9 additions & 13 deletions multicluster/PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,6 @@ multigroup: true
projectName: multicluster
repo: antrea.io/antrea/multicluster
resources:
- api:
crdVersion: v1
namespaced: true
controller: true
domain: crd.antrea.io
group: multicluster
kind: ClusterClaim
path: antrea.io/antrea/multicluster/apis/multicluster/v1alpha1
version: v1alpha1
webhooks:
defaulting: true
validation: true
webhookVersion: v1
- api:
crdVersion: v1
namespaced: true
Expand Down Expand Up @@ -96,4 +83,13 @@ resources:
kind: Gateway
path: antrea.io/antrea/multicluster/apis/multicluster/v1alpha1
version: v1alpha1
- api:
crdVersion: v1
namespaced: true
controller: true
domain: crd.antrea.io
group: multicluster
kind: ClusterClaim
path: antrea.io/antrea/multicluster/apis/multicluster/v1alpha2
version: v1alpha2
version: "3"
145 changes: 0 additions & 145 deletions multicluster/apis/multicluster/v1alpha1/webhook_suite_test.go

This file was deleted.

85 changes: 13 additions & 72 deletions multicluster/apis/multicluster/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 62be426

Please sign in to comment.