Skip to content
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

Remove deprecated v1alpha1 CRDs #6162

Merged
merged 3 commits into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions build/charts/antrea/crds/tier.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,6 @@ metadata:
spec:
group: crd.antrea.io
versions:
- name: v1alpha1
served: true
storage: false
additionalPrinterColumns:
- name: Priority
type: integer
description: The Priority of this Tier relative to other Tiers.
jsonPath: .spec.priority
- name: Age
type: date
jsonPath: .metadata.creationTimestamp
schema:
openAPIV3Schema:
type: object
properties:
spec:
required:
- priority
type: object
properties:
priority:
type: integer
minimum: 0
maximum: 255
description:
type: string
- name: v1beta1
served: true
storage: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ webhooks:
rules:
- operations: ["CREATE", "UPDATE", "DELETE"]
apiGroups: ["crd.antrea.io"]
apiVersions: ["v1alpha1", "v1beta1"]
apiVersions: ["v1beta1"]
resources: ["tiers"]
scope: "Cluster"
admissionReviewVersions: ["v1", "v1beta1"]
Expand Down
28 changes: 1 addition & 27 deletions build/yamls/antrea-aks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4467,32 +4467,6 @@ metadata:
spec:
group: crd.antrea.io
versions:
- name: v1alpha1
served: true
storage: false
additionalPrinterColumns:
- name: Priority
type: integer
description: The Priority of this Tier relative to other Tiers.
jsonPath: .spec.priority
- name: Age
type: date
jsonPath: .metadata.creationTimestamp
schema:
openAPIV3Schema:
type: object
properties:
spec:
required:
- priority
type: object
properties:
priority:
type: integer
minimum: 0
maximum: 255
description:
type: string
- name: v1beta1
served: true
storage: true
Expand Down Expand Up @@ -7256,7 +7230,7 @@ webhooks:
rules:
- operations: ["CREATE", "UPDATE", "DELETE"]
apiGroups: ["crd.antrea.io"]
apiVersions: ["v1alpha1", "v1beta1"]
apiVersions: ["v1beta1"]
resources: ["tiers"]
scope: "Cluster"
admissionReviewVersions: ["v1", "v1beta1"]
Expand Down
26 changes: 0 additions & 26 deletions build/yamls/antrea-crds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4442,32 +4442,6 @@ metadata:
spec:
group: crd.antrea.io
versions:
- name: v1alpha1
served: true
storage: false
additionalPrinterColumns:
- name: Priority
type: integer
description: The Priority of this Tier relative to other Tiers.
jsonPath: .spec.priority
- name: Age
type: date
jsonPath: .metadata.creationTimestamp
schema:
openAPIV3Schema:
type: object
properties:
spec:
required:
- priority
type: object
properties:
priority:
type: integer
minimum: 0
maximum: 255
description:
type: string
- name: v1beta1
served: true
storage: true
Expand Down
28 changes: 1 addition & 27 deletions build/yamls/antrea-eks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4467,32 +4467,6 @@ metadata:
spec:
group: crd.antrea.io
versions:
- name: v1alpha1
served: true
storage: false
additionalPrinterColumns:
- name: Priority
type: integer
description: The Priority of this Tier relative to other Tiers.
jsonPath: .spec.priority
- name: Age
type: date
jsonPath: .metadata.creationTimestamp
schema:
openAPIV3Schema:
type: object
properties:
spec:
required:
- priority
type: object
properties:
priority:
type: integer
minimum: 0
maximum: 255
description:
type: string
- name: v1beta1
served: true
storage: true
Expand Down Expand Up @@ -7257,7 +7231,7 @@ webhooks:
rules:
- operations: ["CREATE", "UPDATE", "DELETE"]
apiGroups: ["crd.antrea.io"]
apiVersions: ["v1alpha1", "v1beta1"]
apiVersions: ["v1beta1"]
resources: ["tiers"]
scope: "Cluster"
admissionReviewVersions: ["v1", "v1beta1"]
Expand Down
28 changes: 1 addition & 27 deletions build/yamls/antrea-gke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4467,32 +4467,6 @@ metadata:
spec:
group: crd.antrea.io
versions:
- name: v1alpha1
served: true
storage: false
additionalPrinterColumns:
- name: Priority
type: integer
description: The Priority of this Tier relative to other Tiers.
jsonPath: .spec.priority
- name: Age
type: date
jsonPath: .metadata.creationTimestamp
schema:
openAPIV3Schema:
type: object
properties:
spec:
required:
- priority
type: object
properties:
priority:
type: integer
minimum: 0
maximum: 255
description:
type: string
- name: v1beta1
served: true
storage: true
Expand Down Expand Up @@ -7254,7 +7228,7 @@ webhooks:
rules:
- operations: ["CREATE", "UPDATE", "DELETE"]
apiGroups: ["crd.antrea.io"]
apiVersions: ["v1alpha1", "v1beta1"]
apiVersions: ["v1beta1"]
resources: ["tiers"]
scope: "Cluster"
admissionReviewVersions: ["v1", "v1beta1"]
Expand Down
28 changes: 1 addition & 27 deletions build/yamls/antrea-ipsec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4467,32 +4467,6 @@ metadata:
spec:
group: crd.antrea.io
versions:
- name: v1alpha1
served: true
storage: false
additionalPrinterColumns:
- name: Priority
type: integer
description: The Priority of this Tier relative to other Tiers.
jsonPath: .spec.priority
- name: Age
type: date
jsonPath: .metadata.creationTimestamp
schema:
openAPIV3Schema:
type: object
properties:
spec:
required:
- priority
type: object
properties:
priority:
type: integer
minimum: 0
maximum: 255
description:
type: string
- name: v1beta1
served: true
storage: true
Expand Down Expand Up @@ -7313,7 +7287,7 @@ webhooks:
rules:
- operations: ["CREATE", "UPDATE", "DELETE"]
apiGroups: ["crd.antrea.io"]
apiVersions: ["v1alpha1", "v1beta1"]
apiVersions: ["v1beta1"]
resources: ["tiers"]
scope: "Cluster"
admissionReviewVersions: ["v1", "v1beta1"]
Expand Down
28 changes: 1 addition & 27 deletions build/yamls/antrea.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4467,32 +4467,6 @@ metadata:
spec:
group: crd.antrea.io
versions:
- name: v1alpha1
served: true
storage: false
additionalPrinterColumns:
- name: Priority
type: integer
description: The Priority of this Tier relative to other Tiers.
jsonPath: .spec.priority
- name: Age
type: date
jsonPath: .metadata.creationTimestamp
schema:
openAPIV3Schema:
type: object
properties:
spec:
required:
- priority
type: object
properties:
priority:
type: integer
minimum: 0
maximum: 255
description:
type: string
- name: v1beta1
served: true
storage: true
Expand Down Expand Up @@ -7254,7 +7228,7 @@ webhooks:
rules:
- operations: ["CREATE", "UPDATE", "DELETE"]
apiGroups: ["crd.antrea.io"]
apiVersions: ["v1alpha1", "v1beta1"]
apiVersions: ["v1beta1"]
resources: ["tiers"]
scope: "Cluster"
admissionReviewVersions: ["v1", "v1beta1"]
Expand Down
8 changes: 4 additions & 4 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ These are the CRDs currently available in `crd.antrea.io`.
| `AntreaControllerInfo` | v1beta1 | v1.0.0 | N/A | N/A |
| `ClusterGroup` | v1alpha3 | v1.1.0 | v1.13.0 | N/A |
| `ClusterGroup` | v1beta1 | v1.13.0 | N/A | N/A |
| `ClusterNetworkPolicy` | v1alpha1 | v1.0.0 | v1.13.0 | N/A |
| `ClusterNetworkPolicy` | v1beta1 | v1.13.0 | N/A | N/A |
| `Egress` | v1alpha2 | v1.0.0 | N/A | N/A |
| `Egress` | v1beta1 | v1.13.0 | N/A | N/A |
Expand All @@ -41,12 +40,9 @@ These are the CRDs currently available in `crd.antrea.io`.
| `IPPool`| v1alpha2 | v1.4.0 | N/A | N/A |
| `Group` | v1alpha3 | v1.8.0 | v1.13.0 | N/A |
| `Group` | v1beta1 | v1.13.0 | N/A | N/A |
| `NetworkPolicy` | v1alpha1 | v1.0.0 | v1.13.0 | N/A |
| `NetworkPolicy` | v1beta1 | v1.13.0 | N/A | N/A |
| `SupportBundleCollection` | v1alpha1 | v1.10.0 | N/A | N/A |
| `Tier` | v1alpha1 | v1.0.0 | v1.13.0 | v2.0.0 |
| `Tier` | v1beta1 | v1.13.0 | N/A | N/A |
| `Traceflow` | v1alpha1 | v1.0.0 | v1.13.0 | N/A |
| `Traceflow` | v1beta1 | v1.13.0 | N/A | N/A |

### Other API groups
Expand Down Expand Up @@ -81,4 +77,8 @@ These are the API group versions which are currently available when using Antrea
| CRD | CRD version | Introduced in | Deprecated in | Removed in |
|---|---|---|---|---|
| `ClusterGroup` | v1alpha2 | v1.0.0 | v1.1.0 | v2.0.0 |
| `ClusterNetworkPolicy` | v1alpha1 | v1.0.0 | v1.13.0 | v2.0.0 |
| `ExternalEntity` | v1alpha1 | v0.10.0 | v0.11.0 | v2.0.0 |
| `NetworkPolicy` | v1alpha1 | v1.0.0 | v1.13.0 | v2.0.0 |
| `Tier` | v1alpha1 | v1.0.0 | v1.13.0 | v2.0.0 |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We didn't have such a long time window between deprecation and removal for this one.
However, it was an Alpha API and we are upgrading to Antrea v2 so that's ok by me. I think we also agreed on this removal when we first started discussing Antrea v2 and bumping up Alpha APIs to Beta.

Adding @tnqn for his opinion.
My only concern would be a user upgrading from an older Antrea version (e.g. 1.11) to Antrea v2.0. In this case, the v1beta1 version of API didn't exist in v1.11, so antctl upgrade api-storage cannot be used. My assumption would be that direct upgrade to v2.0 would not be possible in this case, and that users would need to upgrade to an intermediate version (1.13, 1.14, or 1.15) first. The fact that the 2 API resources are technically the "same" (conversion strategy is None) should be irrelevant here.

I am also tagging @edwardbadboy. We should make sure that the inability to directly upgrade from 1.11, 1.12 to Antrea v2 will not be an issue before we can merge this.

If we do remove this API, I assume we will also remove v1alpha3.ClusterGroup?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for tagging me here. I think it not an issue to upgrade to an intermediate version first, for example 1.11 -> 1.13, 1.11 -> 1.15, then upgrade to 2.0 or 2.1.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We commit "Antrea upgrades to a new release up to 4 minor versions newer", but this is a major version so I assume it's fine. Before releasing v2.0, we should perhaps confirm which path is supported and document a best practice. It seems we could allow 1.13 and above upgrade to 2.0, which sounds not bad.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we should document this before the v2 release

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just found Tier is not the only case, now I wonder why we remove Tier alone and keep other resources of the same situation, including NetworkPolicy, ClusterNetworkPolicy, ClusterGroup and Group. Was Tier marked for removal in 2.0 by accident?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding (based on #4832) is that at least there was agreement to remove all deprecated Alpha APIs as part of Antrea v2 (along with all Beta APIs which were deprecated at least 9-12 months ago). Has this changed?
Not sure why Tier was treated differently in the doc, but I wouldn't read too much into it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know anything changed, then we should also remove v1alpha1 of NetworkPolicy, ClusterNetworkPolicy, ClusterGroup and Group.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we should. @luolanzone perhaps it would make more sense to do all of them at once, although I am also fine with an individual PR for each API?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I can remove all v1alpha1 CRD in this PR. I forgot that we have an agreement to remove all v1alpha1 CRDs. This PR is to based on the discussion here #6089 (comment). I was trying to make the change consistent with api.md. I will remove all v1alpha1 and the api.md as well.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either approach works for me.

| `Traceflow` | v1alpha1 | v1.0.0 | v1.13.0 | v2.0.0 |
8 changes: 0 additions & 8 deletions pkg/apis/crd/v1alpha1/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,6 @@ func Resource(resource string) schema.GroupResource {
func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(
SchemeGroupVersion,
&Traceflow{},
&TraceflowList{},
&NetworkPolicy{},
&NetworkPolicyList{},
&ClusterNetworkPolicy{},
&ClusterNetworkPolicyList{},
&Tier{},
&TierList{},
&ExternalNode{},
&ExternalNodeList{},
&SupportBundleCollection{},
Expand Down
Loading
Loading