Skip to content

Commit

Permalink
Increase the minimum supported Kubernetes version to v1.19
Browse files Browse the repository at this point in the history
Since Kubernetes v1.19, some APIs are deprecated. Add deprecated comment
to those APIs and update documents.

Reference: https://kubernetes.io/docs/reference/using-api/deprecation-guide/

Signed-off-by: hjiajing <hjiajing@vmware.com>
  • Loading branch information
hjiajing committed Apr 18, 2024
1 parent 4bc74d2 commit 06ca2d0
Show file tree
Hide file tree
Showing 14 changed files with 86 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Network Policies in a very efficient manner.

## Prerequisites

Antrea has been tested with Kubernetes clusters running version 1.16 or later.
Antrea has been tested with Kubernetes clusters running version 1.19 or later.

* `NodeIPAMController` must be enabled in the Kubernetes cluster.\
When deploying a cluster with kubeadm the `--pod-network-cidr <cidr>`
Expand Down
2 changes: 2 additions & 0 deletions build/charts/antrea/crds/clustergroup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ spec:
- name: v1alpha3
served: true
storage: false
deprecated: true
deprecationWarning: "crd.antrea.io/v1alpha3 ClusterGroup is deprecated; use crd.antrea.io/v1beta1 ClusterGroup"
schema:
openAPIV3Schema:
type: object
Expand Down
2 changes: 2 additions & 0 deletions build/charts/antrea/crds/clusternetworkpolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ spec:
- name: v1alpha1
served: true
storage: false
deprecated: true
deprecationWarning: "crd.antrea.io/v1alpha1 ClusterNetworkPolicy is deprecated; use crd.antrea.io/v1beta1 ClusterNetworkPolicy"
additionalPrinterColumns:
- name: Tier
type: string
Expand Down
2 changes: 2 additions & 0 deletions build/charts/antrea/crds/externalippool.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ spec:
- name: v1alpha2
served: true
storage: false
deprecated: true
deprecationWarning: "crd.antrea.io/v1alpha2 ExternalIPPool is deprecated; use crd.antrea.io/v1beta1 ExternalIPPool"
schema:
openAPIV3Schema:
type: object
Expand Down
2 changes: 2 additions & 0 deletions build/charts/antrea/crds/group.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ spec:
- name: v1alpha3
served: true
storage: false
deprecated: true
deprecationWarning: "crd.antrea.io/v1alpha3 Group is deprecated; use crd.antrea.io/v1beta1 Group"
schema:
openAPIV3Schema:
type: object
Expand Down
2 changes: 2 additions & 0 deletions build/charts/antrea/crds/networkpolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ spec:
- name: v1alpha1
served: true
storage: false
deprecated: true
deprecationWarning: "crd.antrea.io/v1alpha1 NetworkPolicy is deprecated; use crd.antrea.io/v1beta1 NetworkPolicy"
additionalPrinterColumns:
- name: Tier
type: string
Expand Down
2 changes: 2 additions & 0 deletions build/charts/antrea/crds/traceflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ spec:
- name: v1alpha1
served: true
storage: false
deprecated: true
deprecationWarning: "crd.antrea.io/v1alpha1 Traceflow is deprecated; use crd.antrea.io/v1beta1 Traceflow"
additionalPrinterColumns:
- jsonPath: .status.phase
description: The phase of the Traceflow.
Expand Down
12 changes: 12 additions & 0 deletions build/yamls/antrea-aks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,8 @@ spec:
- name: v1alpha3
served: true
storage: false
deprecated: true
deprecationWarning: "crd.antrea.io/v1alpha3 ClusterGroup is deprecated; use crd.antrea.io/v1beta1 ClusterGroup"
schema:
openAPIV3Schema:
type: object
Expand Down Expand Up @@ -576,6 +578,8 @@ spec:
- name: v1alpha1
served: true
storage: false
deprecated: true
deprecationWarning: "crd.antrea.io/v1alpha1 ClusterNetworkPolicy is deprecated; use crd.antrea.io/v1beta1 ClusterNetworkPolicy"
additionalPrinterColumns:
- name: Tier
type: string
Expand Down Expand Up @@ -2406,6 +2410,8 @@ spec:
- name: v1alpha2
served: true
storage: false
deprecated: true
deprecationWarning: "crd.antrea.io/v1alpha2 ExternalIPPool is deprecated; use crd.antrea.io/v1beta1 ExternalIPPool"
schema:
openAPIV3Schema:
type: object
Expand Down Expand Up @@ -2671,6 +2677,8 @@ spec:
- name: v1alpha3
served: true
storage: false
deprecated: true
deprecationWarning: "crd.antrea.io/v1alpha3 Group is deprecated; use crd.antrea.io/v1beta1 Group"
schema:
openAPIV3Schema:
type: object
Expand Down Expand Up @@ -3052,6 +3060,8 @@ spec:
- name: v1alpha1
served: true
storage: false
deprecated: true
deprecationWarning: "crd.antrea.io/v1alpha1 NetworkPolicy is deprecated; use crd.antrea.io/v1beta1 NetworkPolicy"
additionalPrinterColumns:
- name: Tier
type: string
Expand Down Expand Up @@ -4515,6 +4525,8 @@ spec:
- name: v1alpha1
served: true
storage: false
deprecated: true
deprecationWarning: "crd.antrea.io/v1alpha1 Traceflow is deprecated; use crd.antrea.io/v1beta1 Traceflow"
additionalPrinterColumns:
- jsonPath: .status.phase
description: The phase of the Traceflow.
Expand Down
12 changes: 12 additions & 0 deletions build/yamls/antrea-crds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,8 @@ spec:
- name: v1alpha3
served: true
storage: false
deprecated: true
deprecationWarning: "crd.antrea.io/v1alpha3 ClusterGroup is deprecated; use crd.antrea.io/v1beta1 ClusterGroup"
schema:
openAPIV3Schema:
type: object
Expand Down Expand Up @@ -569,6 +571,8 @@ spec:
- name: v1alpha1
served: true
storage: false
deprecated: true
deprecationWarning: "crd.antrea.io/v1alpha1 ClusterNetworkPolicy is deprecated; use crd.antrea.io/v1beta1 ClusterNetworkPolicy"
additionalPrinterColumns:
- name: Tier
type: string
Expand Down Expand Up @@ -2393,6 +2397,8 @@ spec:
- name: v1alpha2
served: true
storage: false
deprecated: true
deprecationWarning: "crd.antrea.io/v1alpha2 ExternalIPPool is deprecated; use crd.antrea.io/v1beta1 ExternalIPPool"
schema:
openAPIV3Schema:
type: object
Expand Down Expand Up @@ -2654,6 +2660,8 @@ spec:
- name: v1alpha3
served: true
storage: false
deprecated: true
deprecationWarning: "crd.antrea.io/v1alpha3 Group is deprecated; use crd.antrea.io/v1beta1 Group"
schema:
openAPIV3Schema:
type: object
Expand Down Expand Up @@ -3031,6 +3039,8 @@ spec:
- name: v1alpha1
served: true
storage: false
deprecated: true
deprecationWarning: "crd.antrea.io/v1alpha1 NetworkPolicy is deprecated; use crd.antrea.io/v1beta1 NetworkPolicy"
additionalPrinterColumns:
- name: Tier
type: string
Expand Down Expand Up @@ -4488,6 +4498,8 @@ spec:
- name: v1alpha1
served: true
storage: false
deprecated: true
deprecationWarning: "crd.antrea.io/v1alpha1 Traceflow is deprecated; use crd.antrea.io/v1beta1 Traceflow"
additionalPrinterColumns:
- jsonPath: .status.phase
description: The phase of the Traceflow.
Expand Down
12 changes: 12 additions & 0 deletions build/yamls/antrea-eks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,8 @@ spec:
- name: v1alpha3
served: true
storage: false
deprecated: true
deprecationWarning: "crd.antrea.io/v1alpha3 ClusterGroup is deprecated; use crd.antrea.io/v1beta1 ClusterGroup"
schema:
openAPIV3Schema:
type: object
Expand Down Expand Up @@ -576,6 +578,8 @@ spec:
- name: v1alpha1
served: true
storage: false
deprecated: true
deprecationWarning: "crd.antrea.io/v1alpha1 ClusterNetworkPolicy is deprecated; use crd.antrea.io/v1beta1 ClusterNetworkPolicy"
additionalPrinterColumns:
- name: Tier
type: string
Expand Down Expand Up @@ -2406,6 +2410,8 @@ spec:
- name: v1alpha2
served: true
storage: false
deprecated: true
deprecationWarning: "crd.antrea.io/v1alpha2 ExternalIPPool is deprecated; use crd.antrea.io/v1beta1 ExternalIPPool"
schema:
openAPIV3Schema:
type: object
Expand Down Expand Up @@ -2671,6 +2677,8 @@ spec:
- name: v1alpha3
served: true
storage: false
deprecated: true
deprecationWarning: "crd.antrea.io/v1alpha3 Group is deprecated; use crd.antrea.io/v1beta1 Group"
schema:
openAPIV3Schema:
type: object
Expand Down Expand Up @@ -3052,6 +3060,8 @@ spec:
- name: v1alpha1
served: true
storage: false
deprecated: true
deprecationWarning: "crd.antrea.io/v1alpha1 NetworkPolicy is deprecated; use crd.antrea.io/v1beta1 NetworkPolicy"
additionalPrinterColumns:
- name: Tier
type: string
Expand Down Expand Up @@ -4515,6 +4525,8 @@ spec:
- name: v1alpha1
served: true
storage: false
deprecated: true
deprecationWarning: "crd.antrea.io/v1alpha1 Traceflow is deprecated; use crd.antrea.io/v1beta1 Traceflow"
additionalPrinterColumns:
- jsonPath: .status.phase
description: The phase of the Traceflow.
Expand Down
12 changes: 12 additions & 0 deletions build/yamls/antrea-gke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,8 @@ spec:
- name: v1alpha3
served: true
storage: false
deprecated: true
deprecationWarning: "crd.antrea.io/v1alpha3 ClusterGroup is deprecated; use crd.antrea.io/v1beta1 ClusterGroup"
schema:
openAPIV3Schema:
type: object
Expand Down Expand Up @@ -576,6 +578,8 @@ spec:
- name: v1alpha1
served: true
storage: false
deprecated: true
deprecationWarning: "crd.antrea.io/v1alpha1 ClusterNetworkPolicy is deprecated; use crd.antrea.io/v1beta1 ClusterNetworkPolicy"
additionalPrinterColumns:
- name: Tier
type: string
Expand Down Expand Up @@ -2406,6 +2410,8 @@ spec:
- name: v1alpha2
served: true
storage: false
deprecated: true
deprecationWarning: "crd.antrea.io/v1alpha2 ExternalIPPool is deprecated; use crd.antrea.io/v1beta1 ExternalIPPool"
schema:
openAPIV3Schema:
type: object
Expand Down Expand Up @@ -2671,6 +2677,8 @@ spec:
- name: v1alpha3
served: true
storage: false
deprecated: true
deprecationWarning: "crd.antrea.io/v1alpha3 Group is deprecated; use crd.antrea.io/v1beta1 Group"
schema:
openAPIV3Schema:
type: object
Expand Down Expand Up @@ -3052,6 +3060,8 @@ spec:
- name: v1alpha1
served: true
storage: false
deprecated: true
deprecationWarning: "crd.antrea.io/v1alpha1 NetworkPolicy is deprecated; use crd.antrea.io/v1beta1 NetworkPolicy"
additionalPrinterColumns:
- name: Tier
type: string
Expand Down Expand Up @@ -4515,6 +4525,8 @@ spec:
- name: v1alpha1
served: true
storage: false
deprecated: true
deprecationWarning: "crd.antrea.io/v1alpha1 Traceflow is deprecated; use crd.antrea.io/v1beta1 Traceflow"
additionalPrinterColumns:
- jsonPath: .status.phase
description: The phase of the Traceflow.
Expand Down
12 changes: 12 additions & 0 deletions build/yamls/antrea-ipsec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,8 @@ spec:
- name: v1alpha3
served: true
storage: false
deprecated: true
deprecationWarning: "crd.antrea.io/v1alpha3 ClusterGroup is deprecated; use crd.antrea.io/v1beta1 ClusterGroup"
schema:
openAPIV3Schema:
type: object
Expand Down Expand Up @@ -576,6 +578,8 @@ spec:
- name: v1alpha1
served: true
storage: false
deprecated: true
deprecationWarning: "crd.antrea.io/v1alpha1 ClusterNetworkPolicy is deprecated; use crd.antrea.io/v1beta1 ClusterNetworkPolicy"
additionalPrinterColumns:
- name: Tier
type: string
Expand Down Expand Up @@ -2406,6 +2410,8 @@ spec:
- name: v1alpha2
served: true
storage: false
deprecated: true
deprecationWarning: "crd.antrea.io/v1alpha2 ExternalIPPool is deprecated; use crd.antrea.io/v1beta1 ExternalIPPool"
schema:
openAPIV3Schema:
type: object
Expand Down Expand Up @@ -2671,6 +2677,8 @@ spec:
- name: v1alpha3
served: true
storage: false
deprecated: true
deprecationWarning: "crd.antrea.io/v1alpha3 Group is deprecated; use crd.antrea.io/v1beta1 Group"
schema:
openAPIV3Schema:
type: object
Expand Down Expand Up @@ -3052,6 +3060,8 @@ spec:
- name: v1alpha1
served: true
storage: false
deprecated: true
deprecationWarning: "crd.antrea.io/v1alpha1 NetworkPolicy is deprecated; use crd.antrea.io/v1beta1 NetworkPolicy"
additionalPrinterColumns:
- name: Tier
type: string
Expand Down Expand Up @@ -4515,6 +4525,8 @@ spec:
- name: v1alpha1
served: true
storage: false
deprecated: true
deprecationWarning: "crd.antrea.io/v1alpha1 Traceflow is deprecated; use crd.antrea.io/v1beta1 Traceflow"
additionalPrinterColumns:
- jsonPath: .status.phase
description: The phase of the Traceflow.
Expand Down
12 changes: 12 additions & 0 deletions build/yamls/antrea.yml
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,8 @@ spec:
- name: v1alpha3
served: true
storage: false
deprecated: true
deprecationWarning: "crd.antrea.io/v1alpha3 ClusterGroup is deprecated; use crd.antrea.io/v1beta1 ClusterGroup"
schema:
openAPIV3Schema:
type: object
Expand Down Expand Up @@ -576,6 +578,8 @@ spec:
- name: v1alpha1
served: true
storage: false
deprecated: true
deprecationWarning: "crd.antrea.io/v1alpha1 ClusterNetworkPolicy is deprecated; use crd.antrea.io/v1beta1 ClusterNetworkPolicy"
additionalPrinterColumns:
- name: Tier
type: string
Expand Down Expand Up @@ -2406,6 +2410,8 @@ spec:
- name: v1alpha2
served: true
storage: false
deprecated: true
deprecationWarning: "crd.antrea.io/v1alpha2 ExternalIPPool is deprecated; use crd.antrea.io/v1beta1 ExternalIPPool"
schema:
openAPIV3Schema:
type: object
Expand Down Expand Up @@ -2671,6 +2677,8 @@ spec:
- name: v1alpha3
served: true
storage: false
deprecated: true
deprecationWarning: "crd.antrea.io/v1alpha3 Group is deprecated; use crd.antrea.io/v1beta1 Group"
schema:
openAPIV3Schema:
type: object
Expand Down Expand Up @@ -3052,6 +3060,8 @@ spec:
- name: v1alpha1
served: true
storage: false
deprecated: true
deprecationWarning: "crd.antrea.io/v1alpha1 NetworkPolicy is deprecated; use crd.antrea.io/v1beta1 NetworkPolicy"
additionalPrinterColumns:
- name: Tier
type: string
Expand Down Expand Up @@ -4515,6 +4525,8 @@ spec:
- name: v1alpha1
served: true
storage: false
deprecated: true
deprecationWarning: "crd.antrea.io/v1alpha1 Traceflow is deprecated; use crd.antrea.io/v1beta1 Traceflow"
additionalPrinterColumns:
- jsonPath: .status.phase
description: The phase of the Traceflow.
Expand Down
1 change: 1 addition & 0 deletions pkg/apiserver/handlers/webhook/convert_crd.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ func statusSucceed() metav1.Status {

// doConversionV1beta1 converts the requested objects in the v1beta1 ConversionRequest using the given conversion function and
// returns a conversion response. Failures are reported with the Reason in the conversion response.
// Deprecated: apiextensions/v1beta1 is deprecated, use apiextensions/v1 instead
func doConversionV1beta1(convertRequest *v1beta1.ConversionRequest, convert convertFunc) *v1beta1.ConversionResponse {
var convertedObjects []runtime.RawExtension
for _, obj := range convertRequest.Objects {
Expand Down

0 comments on commit 06ca2d0

Please sign in to comment.