mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-19 06:26:44 +00:00
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:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user