diff --git a/README.md b/README.md index 7a01286bfbe..15885178c2e 100644 --- a/README.md +++ b/README.md @@ -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 ` diff --git a/build/charts/antrea/crds/clustergroup.yaml b/build/charts/antrea/crds/clustergroup.yaml index 4ff7eaf5b9d..5d307e4fa8f 100644 --- a/build/charts/antrea/crds/clustergroup.yaml +++ b/build/charts/antrea/crds/clustergroup.yaml @@ -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 diff --git a/build/charts/antrea/crds/clusternetworkpolicy.yaml b/build/charts/antrea/crds/clusternetworkpolicy.yaml index a6e2cca2530..4880fed7b89 100644 --- a/build/charts/antrea/crds/clusternetworkpolicy.yaml +++ b/build/charts/antrea/crds/clusternetworkpolicy.yaml @@ -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 diff --git a/build/charts/antrea/crds/externalippool.yaml b/build/charts/antrea/crds/externalippool.yaml index ac17a519c1b..91ae909b0d6 100644 --- a/build/charts/antrea/crds/externalippool.yaml +++ b/build/charts/antrea/crds/externalippool.yaml @@ -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 diff --git a/build/charts/antrea/crds/group.yaml b/build/charts/antrea/crds/group.yaml index a39783a7b57..e9dd998a243 100644 --- a/build/charts/antrea/crds/group.yaml +++ b/build/charts/antrea/crds/group.yaml @@ -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 diff --git a/build/charts/antrea/crds/networkpolicy.yaml b/build/charts/antrea/crds/networkpolicy.yaml index f9b281dd97a..abc84a58c1e 100644 --- a/build/charts/antrea/crds/networkpolicy.yaml +++ b/build/charts/antrea/crds/networkpolicy.yaml @@ -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 diff --git a/build/charts/antrea/crds/traceflow.yaml b/build/charts/antrea/crds/traceflow.yaml index 90b139ecb4f..72a1f99fa95 100644 --- a/build/charts/antrea/crds/traceflow.yaml +++ b/build/charts/antrea/crds/traceflow.yaml @@ -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. diff --git a/build/yamls/antrea-aks.yml b/build/yamls/antrea-aks.yml index a2cd0b827d2..dc1dca6afaf 100644 --- a/build/yamls/antrea-aks.yml +++ b/build/yamls/antrea-aks.yml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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. diff --git a/build/yamls/antrea-crds.yml b/build/yamls/antrea-crds.yml index 8864d50ba06..a98db47935c 100644 --- a/build/yamls/antrea-crds.yml +++ b/build/yamls/antrea-crds.yml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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. diff --git a/build/yamls/antrea-eks.yml b/build/yamls/antrea-eks.yml index b47cd651b64..899d6c16192 100644 --- a/build/yamls/antrea-eks.yml +++ b/build/yamls/antrea-eks.yml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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. diff --git a/build/yamls/antrea-gke.yml b/build/yamls/antrea-gke.yml index 0984ab8ff54..69b9be4f36a 100644 --- a/build/yamls/antrea-gke.yml +++ b/build/yamls/antrea-gke.yml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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. diff --git a/build/yamls/antrea-ipsec.yml b/build/yamls/antrea-ipsec.yml index 1da6e0b3e27..b4b258bf3f2 100644 --- a/build/yamls/antrea-ipsec.yml +++ b/build/yamls/antrea-ipsec.yml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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. diff --git a/build/yamls/antrea.yml b/build/yamls/antrea.yml index e3d12af05e1..b8a1c6b6ad2 100644 --- a/build/yamls/antrea.yml +++ b/build/yamls/antrea.yml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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. diff --git a/pkg/apiserver/handlers/webhook/convert_crd.go b/pkg/apiserver/handlers/webhook/convert_crd.go index 930789bd525..eec3d16baa1 100644 --- a/pkg/apiserver/handlers/webhook/convert_crd.go +++ b/pkg/apiserver/handlers/webhook/convert_crd.go @@ -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 {