feat: migrate kubebuilder from v2 to v3

1. remove config/crd/v1beta1
2. remove PROJECT file
3. update controller-gen and kubebuilder version
4. generate client and CRD file
5. add changelog and remove v1beta1 CRD generated code.
6. add kubebuilder test bundle setup command.
7. due to apiextensions.k8s.io/v1beta1 is not supported, only k8s after v1.16 is supported, so remove v1.15 check.
8. add CRD and k8s suppored version update in changelog.

Signed-off-by: Xun Jiang <jxun@vmware.com>
This commit is contained in:
Xun Jiang
2021-11-23 19:32:19 +08:00
parent 11abff4e8d
commit 303d3dcad3
46 changed files with 120 additions and 3796 deletions
-6
View File
@@ -27,7 +27,6 @@ import (
"k8s.io/apimachinery/pkg/runtime/schema"
v1crds "github.com/vmware-tanzu/velero/config/crd/v1/crds"
v1beta1crds "github.com/vmware-tanzu/velero/config/crd/v1beta1/crds"
velerov1api "github.com/vmware-tanzu/velero/pkg/apis/velero/v1"
)
@@ -226,11 +225,6 @@ func AllCRDs(perferredAPIVersion string) *unstructured.UnstructuredList {
resources.SetGroupVersionKind(schema.GroupVersionKind{Group: "", Version: "v1", Kind: "List"})
switch perferredAPIVersion {
case "v1beta1":
for _, crd := range v1beta1crds.CRDs {
crd.SetLabels(Labels())
appendUnstructured(resources, crd)
}
case "v1":
for _, crd := range v1crds.CRDs {
crd.SetLabels(Labels())