From 3800d738f9f535838a7f6d3de1225c23816e9cf9 Mon Sep 17 00:00:00 2001 From: hongzhouzi <36416216+hongzhouzi@users.noreply.github.com> Date: Thu, 20 Oct 2022 17:37:40 +0800 Subject: [PATCH] Use controller-gen to generate deepcopy code replacing deepcopy-gen. (#5297) Use controller-gen to generate deepcopy code, and replace the deepcopy-gen tags with the kubebuilder tags. Signed-off-by: hongzhouzi Signed-off-by: hongzhouzi --- Makefile | 4 +- ...erting.kubesphere.io_globalrulegroups.yaml | 4 +- ...cation.kubesphere.io_helmapplications.yaml | 2 +- ...kubesphere.io_helmapplicationversions.yaml | 2 +- ...lication.kubesphere.io_helmcategories.yaml | 2 +- ...pplication.kubesphere.io_helmreleases.yaml | 2 +- .../application.kubesphere.io_helmrepos.yaml | 2 +- .../crds/cluster.kubesphere.io_clusters.yaml | 2 +- .../crds/gateway.kubesphere.io_gateways.yaml | 2 +- ...m.kubesphere.io_federatedrolebindings.yaml | 2 +- .../iam.kubesphere.io_federatedroles.yaml | 2 +- .../iam.kubesphere.io_federatedusers.yaml | 2 +- .../iam.kubesphere.io_globalrolebindings.yaml | 2 +- .../crds/iam.kubesphere.io_globalroles.yaml | 2 +- .../crds/iam.kubesphere.io_groupbindings.yaml | 2 +- config/crds/iam.kubesphere.io_groups.yaml | 2 +- .../crds/iam.kubesphere.io_loginrecords.yaml | 2 +- config/crds/iam.kubesphere.io_rolebases.yaml | 2 +- config/crds/iam.kubesphere.io_users.yaml | 2 +- ...m.kubesphere.io_workspacerolebindings.yaml | 2 +- .../iam.kubesphere.io_workspaceroles.yaml | 2 +- .../network.kubesphere.io_ipamblocks.yaml | 2 +- .../network.kubesphere.io_ipamhandles.yaml | 2 +- .../crds/network.kubesphere.io_ippools.yaml | 2 +- ...ubesphere.io_namespacenetworkpolicies.yaml | 2 +- .../quota.kubesphere.io_resourcequotas.yaml | 2 +- ...kubesphere.io_provisionercapabilities.yaml | 2 +- ...ubesphere.io_storageclasscapabilities.yaml | 2 +- .../crds/tenant.kubesphere.io_workspaces.yaml | 2 +- ...nant.kubesphere.io_workspacetemplates.yaml | 2 +- hack/generate_manifests.sh | 27 +- hack/update-goimports.sh | 2 +- hack/verify-goimports.sh | 2 +- .../resourcequota/apis/resourcequota/types.go | 2 +- .../kubesphere.io/api/alerting/v2beta1/doc.go | 2 +- .../api/alerting/v2beta1/rulegroup_types.go | 18 +- .../api/application/v1alpha1/doc.go | 2 +- .../v1alpha1/helmapplication_types.go | 4 +- .../v1alpha1/helmapplicationversion_types.go | 4 +- .../v1alpha1/helmcategory_types.go | 4 +- .../application/v1alpha1/helmrelease_types.go | 4 +- .../application/v1alpha1/helmrepo_types.go | 4 +- .../v1alpha1/zz_generated.deepcopy.go | 30 +-- .../api/auditing/v1alpha1/register.go | 2 +- .../api/auditing/v1alpha1/rule_types.go | 2 - .../api/auditing/v1alpha1/webhook_types.go | 4 +- .../api/cluster/v1alpha1/cluster_types.go | 4 +- .../kubesphere.io/api/cluster/v1alpha1/doc.go | 2 +- .../api/cluster/v1alpha1/register.go | 2 +- .../cluster/v1alpha1/zz_generated.deepcopy.go | 8 +- .../kubesphere.io/api/devops/v1alpha1/doc.go | 2 +- .../api/devops/v1alpha1/register.go | 2 +- .../api/devops/v1alpha1/s2ibinary_types.go | 4 +- .../api/devops/v1alpha1/s2ibuilder_types.go | 4 +- .../v1alpha1/s2ibuildertemplate_types.go | 4 +- .../api/devops/v1alpha1/s2irun_types.go | 4 +- .../devops/v1alpha3/devopsproject_types.go | 4 +- .../kubesphere.io/api/devops/v1alpha3/doc.go | 2 +- .../api/devops/v1alpha3/pipeline_types.go | 4 +- .../api/devops/v1alpha3/register.go | 2 +- .../src/kubesphere.io/api/iam/v1alpha2/doc.go | 2 +- .../api/iam/v1alpha2/group_types.go | 4 +- .../api/iam/v1alpha2/groupbinding_types.go | 4 +- .../kubesphere.io/api/iam/v1alpha2/types.go | 28 +- .../api/iam/v1alpha2/zz_generated.deepcopy.go | 246 +----------------- .../network/calicov3/block_affinity_types.go | 4 +- .../kubesphere.io/api/network/calicov3/doc.go | 2 +- .../api/network/calicov3/ipamblock_types.go | 4 +- .../api/network/calicov3/ippool_types.go | 4 +- .../kubesphere.io/api/network/v1alpha1/doc.go | 2 +- .../api/network/v1alpha1/ipamblock_types.go | 4 +- .../api/network/v1alpha1/ipamhandle_types.go | 4 +- .../api/network/v1alpha1/ippool_types.go | 4 +- .../v1alpha1/namespacenetworkpolicy_types.go | 4 +- .../api/network/v1alpha1/register.go | 2 +- .../network/v1alpha1/zz_generated.deepcopy.go | 28 +- .../api/notification/v2beta1/register.go | 2 +- .../v2beta2/notificationmanager_types.go | 4 +- .../api/notification/v2beta2/register.go | 2 +- .../kubesphere.io/api/quota/v1alpha2/doc.go | 2 +- .../api/quota/v1alpha2/register.go | 2 +- .../kubesphere.io/api/quota/v1alpha2/types.go | 6 +- .../quota/v1alpha2/zz_generated.deepcopy.go | 8 +- .../api/servicemesh/v1alpha2/doc.go | 2 +- .../api/servicemesh/v1alpha2/register.go | 2 +- .../v1alpha2/servicepolicy_types.go | 4 +- .../servicemesh/v1alpha2/strategy_types.go | 4 +- .../api/storage/v1alpha1/capability_types.go | 8 +- .../kubesphere.io/api/storage/v1alpha1/doc.go | 2 +- .../api/storage/v1alpha1/register.go | 2 +- .../storage/v1alpha1/zz_generated.deepcopy.go | 12 +- .../kubesphere.io/api/tenant/v1alpha1/doc.go | 2 +- .../api/tenant/v1alpha1/register.go | 2 +- .../api/tenant/v1alpha1/workspace_types.go | 4 +- .../tenant/v1alpha1/zz_generated.deepcopy.go | 6 +- .../kubesphere.io/api/tenant/v1alpha2/doc.go | 2 +- .../api/tenant/v1alpha2/register.go | 2 +- .../v1alpha2/workspacetemplate_types.go | 4 +- .../tenant/v1alpha2/zz_generated.deepcopy.go | 4 +- .../kubesphere.io/api/types/v1beta1/doc.go | 2 +- .../v1beta1/federatedapplication_types.go | 4 +- .../v1beta1/federatedclusterrole_types.go | 4 +- .../federatedclusterrolebinding_types.go | 4 +- .../types/v1beta1/federatedconfigmap_types.go | 4 +- .../v1beta1/federateddeployment_types.go | 4 +- .../api/types/v1beta1/federatedgroup_types.go | 4 +- .../v1beta1/federatedgroupbinding_types.go | 4 +- .../types/v1beta1/federatedingress_types.go | 4 +- .../api/types/v1beta1/federatedjob_types.go | 4 +- .../v1beta1/federatedlimitrange_types.go | 4 +- .../types/v1beta1/federatednamespace_types.go | 4 +- .../federatednotificationconfig_types.go | 5 +- .../federatednotificationreceiver_types.go | 4 +- .../federatedpersistentvolumeclaim_types.go | 4 +- .../types/v1beta1/federatedsecret_types.go | 4 +- .../types/v1beta1/federatedservice_types.go | 4 +- .../v1beta1/federatedstatefulset_types.go | 4 +- .../api/types/v1beta1/federateduser_types.go | 4 +- .../types/v1beta1/federatedworkspace_types.go | 4 +- .../v1beta1/federatedworkspacerole_types.go | 4 +- .../federatedworkspacerolebinding_types.go | 4 +- .../api/types/v1beta1/register.go | 2 +- .../kubesphere.io/api/types/v1beta2/doc.go | 2 +- .../federatednotificationconfig_types.go | 4 +- .../federatednotificationmanager_types.go | 4 +- .../federatednotificationreceiver_types.go | 4 +- .../federatednotificationrouter_types.go | 4 +- .../federatednotificationsilence_types.go | 4 +- .../api/types/v1beta2/register.go | 1 - .../types/v1beta2/zz_generated.deepcopy.go | 36 ++- 130 files changed, 259 insertions(+), 548 deletions(-) diff --git a/Makefile b/Makefile index ec2997a61..64e01c4c4 100644 --- a/Makefile +++ b/Makefile @@ -96,9 +96,9 @@ deploy: manifests ;$(info $(M)...Begin to deploy.) @ ## Deploy. mockgen: ;$(info $(M)...Begin to mockgen.) @ ## Mockgen. mockgen -package=openpitrix -source=pkg/simple/client/openpitrix/openpitrix.go -destination=pkg/simple/client/openpitrix/mock.go -# Deprecated deepcopy cause we will replace deepcopy-gen with controller-gen +# Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations. deepcopy: ;$(info $(M)...Begin to deepcopy.) @ ## Deepcopy. - hack/generate_group.sh "deepcopy" kubesphere.io/api kubesphere.io/api ${GV} --output-base=staging/src/ -h "hack/boilerplate.go.txt" + hack/generate_manifests.sh ${CRD_OPTIONS} ${MANIFESTS} "deepcopy" openapi: ;$(info $(M)...Begin to openapi.) @ ## Openapi. go run ./vendor/k8s.io/kube-openapi/cmd/openapi-gen/openapi-gen.go -O openapi_generated -i ./vendor/k8s.io/apimachinery/pkg/apis/meta/v1,./vendor/kubesphere.io/api/tenant/v1alpha1 -p kubesphere.io/api/tenant/v1alpha1 -h ./hack/boilerplate.go.txt --report-filename ./api/api-rules/violation_exceptions.list --output-base=staging/src/ diff --git a/config/crds/alerting.kubesphere.io_globalrulegroups.yaml b/config/crds/alerting.kubesphere.io_globalrulegroups.yaml index 2b9c49d6a..a644bf104 100644 --- a/config/crds/alerting.kubesphere.io_globalrulegroups.yaml +++ b/config/crds/alerting.kubesphere.io_globalrulegroups.yaml @@ -87,12 +87,12 @@ spec: cpu: description: Only one of its members may be specified. properties: + load5m: + type: number load15m: type: number load1m: type: number - load5m: - type: number utilization: type: number type: object diff --git a/config/crds/application.kubesphere.io_helmapplications.yaml b/config/crds/application.kubesphere.io_helmapplications.yaml index 3a1027238..5d2ab7cba 100644 --- a/config/crds/application.kubesphere.io_helmapplications.yaml +++ b/config/crds/application.kubesphere.io_helmapplications.yaml @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: (devel) + controller-gen.kubebuilder.io/version: "" creationTimestamp: null name: helmapplications.application.kubesphere.io spec: diff --git a/config/crds/application.kubesphere.io_helmapplicationversions.yaml b/config/crds/application.kubesphere.io_helmapplicationversions.yaml index 713bd8809..53d0f25d8 100644 --- a/config/crds/application.kubesphere.io_helmapplicationversions.yaml +++ b/config/crds/application.kubesphere.io_helmapplicationversions.yaml @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: (devel) + controller-gen.kubebuilder.io/version: "" creationTimestamp: null name: helmapplicationversions.application.kubesphere.io spec: diff --git a/config/crds/application.kubesphere.io_helmcategories.yaml b/config/crds/application.kubesphere.io_helmcategories.yaml index 93d8f890e..3389eef98 100644 --- a/config/crds/application.kubesphere.io_helmcategories.yaml +++ b/config/crds/application.kubesphere.io_helmcategories.yaml @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: (devel) + controller-gen.kubebuilder.io/version: "" creationTimestamp: null name: helmcategories.application.kubesphere.io spec: diff --git a/config/crds/application.kubesphere.io_helmreleases.yaml b/config/crds/application.kubesphere.io_helmreleases.yaml index 936765555..41db99147 100644 --- a/config/crds/application.kubesphere.io_helmreleases.yaml +++ b/config/crds/application.kubesphere.io_helmreleases.yaml @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: (devel) + controller-gen.kubebuilder.io/version: "" creationTimestamp: null name: helmreleases.application.kubesphere.io spec: diff --git a/config/crds/application.kubesphere.io_helmrepos.yaml b/config/crds/application.kubesphere.io_helmrepos.yaml index 017a94318..d3d56ad9e 100644 --- a/config/crds/application.kubesphere.io_helmrepos.yaml +++ b/config/crds/application.kubesphere.io_helmrepos.yaml @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: (devel) + controller-gen.kubebuilder.io/version: "" creationTimestamp: null name: helmrepos.application.kubesphere.io spec: diff --git a/config/crds/cluster.kubesphere.io_clusters.yaml b/config/crds/cluster.kubesphere.io_clusters.yaml index 30a110964..1b21e77a8 100644 --- a/config/crds/cluster.kubesphere.io_clusters.yaml +++ b/config/crds/cluster.kubesphere.io_clusters.yaml @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: (devel) + controller-gen.kubebuilder.io/version: "" creationTimestamp: null name: clusters.cluster.kubesphere.io spec: diff --git a/config/crds/gateway.kubesphere.io_gateways.yaml b/config/crds/gateway.kubesphere.io_gateways.yaml index 28c8212c5..5178a25e8 100644 --- a/config/crds/gateway.kubesphere.io_gateways.yaml +++ b/config/crds/gateway.kubesphere.io_gateways.yaml @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: (devel) + controller-gen.kubebuilder.io/version: "" creationTimestamp: null name: gateways.gateway.kubesphere.io spec: diff --git a/config/crds/iam.kubesphere.io_federatedrolebindings.yaml b/config/crds/iam.kubesphere.io_federatedrolebindings.yaml index 9ff066498..558db2351 100644 --- a/config/crds/iam.kubesphere.io_federatedrolebindings.yaml +++ b/config/crds/iam.kubesphere.io_federatedrolebindings.yaml @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: (devel) + controller-gen.kubebuilder.io/version: "" creationTimestamp: null name: federatedrolebindings.iam.kubesphere.io spec: diff --git a/config/crds/iam.kubesphere.io_federatedroles.yaml b/config/crds/iam.kubesphere.io_federatedroles.yaml index 20f66f877..d9597af1c 100644 --- a/config/crds/iam.kubesphere.io_federatedroles.yaml +++ b/config/crds/iam.kubesphere.io_federatedroles.yaml @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: (devel) + controller-gen.kubebuilder.io/version: "" creationTimestamp: null name: federatedroles.iam.kubesphere.io spec: diff --git a/config/crds/iam.kubesphere.io_federatedusers.yaml b/config/crds/iam.kubesphere.io_federatedusers.yaml index 1e8162512..ea0286c4b 100644 --- a/config/crds/iam.kubesphere.io_federatedusers.yaml +++ b/config/crds/iam.kubesphere.io_federatedusers.yaml @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: (devel) + controller-gen.kubebuilder.io/version: "" creationTimestamp: null name: federatedusers.iam.kubesphere.io spec: diff --git a/config/crds/iam.kubesphere.io_globalrolebindings.yaml b/config/crds/iam.kubesphere.io_globalrolebindings.yaml index 7d51179f8..69e78b972 100644 --- a/config/crds/iam.kubesphere.io_globalrolebindings.yaml +++ b/config/crds/iam.kubesphere.io_globalrolebindings.yaml @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: (devel) + controller-gen.kubebuilder.io/version: "" creationTimestamp: null name: globalrolebindings.iam.kubesphere.io spec: diff --git a/config/crds/iam.kubesphere.io_globalroles.yaml b/config/crds/iam.kubesphere.io_globalroles.yaml index a1b0677fd..44d5281ec 100644 --- a/config/crds/iam.kubesphere.io_globalroles.yaml +++ b/config/crds/iam.kubesphere.io_globalroles.yaml @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: (devel) + controller-gen.kubebuilder.io/version: "" creationTimestamp: null name: globalroles.iam.kubesphere.io spec: diff --git a/config/crds/iam.kubesphere.io_groupbindings.yaml b/config/crds/iam.kubesphere.io_groupbindings.yaml index e05fa955f..1a5207f5c 100644 --- a/config/crds/iam.kubesphere.io_groupbindings.yaml +++ b/config/crds/iam.kubesphere.io_groupbindings.yaml @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: (devel) + controller-gen.kubebuilder.io/version: "" creationTimestamp: null name: groupbindings.iam.kubesphere.io spec: diff --git a/config/crds/iam.kubesphere.io_groups.yaml b/config/crds/iam.kubesphere.io_groups.yaml index 100200e51..b28148c3c 100644 --- a/config/crds/iam.kubesphere.io_groups.yaml +++ b/config/crds/iam.kubesphere.io_groups.yaml @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: (devel) + controller-gen.kubebuilder.io/version: "" creationTimestamp: null name: groups.iam.kubesphere.io spec: diff --git a/config/crds/iam.kubesphere.io_loginrecords.yaml b/config/crds/iam.kubesphere.io_loginrecords.yaml index 65032708f..f2b4a4a47 100644 --- a/config/crds/iam.kubesphere.io_loginrecords.yaml +++ b/config/crds/iam.kubesphere.io_loginrecords.yaml @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: (devel) + controller-gen.kubebuilder.io/version: "" creationTimestamp: null name: loginrecords.iam.kubesphere.io spec: diff --git a/config/crds/iam.kubesphere.io_rolebases.yaml b/config/crds/iam.kubesphere.io_rolebases.yaml index ba91786e8..13c071f72 100644 --- a/config/crds/iam.kubesphere.io_rolebases.yaml +++ b/config/crds/iam.kubesphere.io_rolebases.yaml @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: (devel) + controller-gen.kubebuilder.io/version: "" creationTimestamp: null name: rolebases.iam.kubesphere.io spec: diff --git a/config/crds/iam.kubesphere.io_users.yaml b/config/crds/iam.kubesphere.io_users.yaml index 84273e466..d4c254292 100644 --- a/config/crds/iam.kubesphere.io_users.yaml +++ b/config/crds/iam.kubesphere.io_users.yaml @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: (devel) + controller-gen.kubebuilder.io/version: "" creationTimestamp: null name: users.iam.kubesphere.io spec: diff --git a/config/crds/iam.kubesphere.io_workspacerolebindings.yaml b/config/crds/iam.kubesphere.io_workspacerolebindings.yaml index 9857946bf..637ec8b3c 100644 --- a/config/crds/iam.kubesphere.io_workspacerolebindings.yaml +++ b/config/crds/iam.kubesphere.io_workspacerolebindings.yaml @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: (devel) + controller-gen.kubebuilder.io/version: "" creationTimestamp: null name: workspacerolebindings.iam.kubesphere.io spec: diff --git a/config/crds/iam.kubesphere.io_workspaceroles.yaml b/config/crds/iam.kubesphere.io_workspaceroles.yaml index 940ea9910..127e51021 100644 --- a/config/crds/iam.kubesphere.io_workspaceroles.yaml +++ b/config/crds/iam.kubesphere.io_workspaceroles.yaml @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: (devel) + controller-gen.kubebuilder.io/version: "" creationTimestamp: null name: workspaceroles.iam.kubesphere.io spec: diff --git a/config/crds/network.kubesphere.io_ipamblocks.yaml b/config/crds/network.kubesphere.io_ipamblocks.yaml index cea49291b..bbe0d29e7 100644 --- a/config/crds/network.kubesphere.io_ipamblocks.yaml +++ b/config/crds/network.kubesphere.io_ipamblocks.yaml @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: (devel) + controller-gen.kubebuilder.io/version: "" creationTimestamp: null name: ipamblocks.network.kubesphere.io spec: diff --git a/config/crds/network.kubesphere.io_ipamhandles.yaml b/config/crds/network.kubesphere.io_ipamhandles.yaml index 00b2f075d..1e509227e 100644 --- a/config/crds/network.kubesphere.io_ipamhandles.yaml +++ b/config/crds/network.kubesphere.io_ipamhandles.yaml @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: (devel) + controller-gen.kubebuilder.io/version: "" creationTimestamp: null name: ipamhandles.network.kubesphere.io spec: diff --git a/config/crds/network.kubesphere.io_ippools.yaml b/config/crds/network.kubesphere.io_ippools.yaml index 0dd7f25c4..ca24b12a8 100644 --- a/config/crds/network.kubesphere.io_ippools.yaml +++ b/config/crds/network.kubesphere.io_ippools.yaml @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: (devel) + controller-gen.kubebuilder.io/version: "" creationTimestamp: null name: ippools.network.kubesphere.io spec: diff --git a/config/crds/network.kubesphere.io_namespacenetworkpolicies.yaml b/config/crds/network.kubesphere.io_namespacenetworkpolicies.yaml index 7a6f71f81..748ceba17 100644 --- a/config/crds/network.kubesphere.io_namespacenetworkpolicies.yaml +++ b/config/crds/network.kubesphere.io_namespacenetworkpolicies.yaml @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: (devel) + controller-gen.kubebuilder.io/version: "" creationTimestamp: null name: namespacenetworkpolicies.network.kubesphere.io spec: diff --git a/config/crds/quota.kubesphere.io_resourcequotas.yaml b/config/crds/quota.kubesphere.io_resourcequotas.yaml index e5b33e424..42c4a6c13 100644 --- a/config/crds/quota.kubesphere.io_resourcequotas.yaml +++ b/config/crds/quota.kubesphere.io_resourcequotas.yaml @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: (devel) + controller-gen.kubebuilder.io/version: "" creationTimestamp: null name: resourcequotas.quota.kubesphere.io spec: diff --git a/config/crds/storage.kubesphere.io_provisionercapabilities.yaml b/config/crds/storage.kubesphere.io_provisionercapabilities.yaml index 83aabb924..687c5a601 100644 --- a/config/crds/storage.kubesphere.io_provisionercapabilities.yaml +++ b/config/crds/storage.kubesphere.io_provisionercapabilities.yaml @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: (devel) + controller-gen.kubebuilder.io/version: "" creationTimestamp: null name: provisionercapabilities.storage.kubesphere.io spec: diff --git a/config/crds/storage.kubesphere.io_storageclasscapabilities.yaml b/config/crds/storage.kubesphere.io_storageclasscapabilities.yaml index 907b5c43a..0426d5172 100644 --- a/config/crds/storage.kubesphere.io_storageclasscapabilities.yaml +++ b/config/crds/storage.kubesphere.io_storageclasscapabilities.yaml @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: (devel) + controller-gen.kubebuilder.io/version: "" creationTimestamp: null name: storageclasscapabilities.storage.kubesphere.io spec: diff --git a/config/crds/tenant.kubesphere.io_workspaces.yaml b/config/crds/tenant.kubesphere.io_workspaces.yaml index 7b10de9c4..5ae487f3c 100644 --- a/config/crds/tenant.kubesphere.io_workspaces.yaml +++ b/config/crds/tenant.kubesphere.io_workspaces.yaml @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: (devel) + controller-gen.kubebuilder.io/version: "" creationTimestamp: null name: workspaces.tenant.kubesphere.io spec: diff --git a/config/crds/tenant.kubesphere.io_workspacetemplates.yaml b/config/crds/tenant.kubesphere.io_workspacetemplates.yaml index 3f517bc41..00bdfc125 100644 --- a/config/crds/tenant.kubesphere.io_workspacetemplates.yaml +++ b/config/crds/tenant.kubesphere.io_workspacetemplates.yaml @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: (devel) + controller-gen.kubebuilder.io/version: "" creationTimestamp: null name: workspacetemplates.tenant.kubesphere.io spec: diff --git a/hack/generate_manifests.sh b/hack/generate_manifests.sh index 9fbf4c9ab..2be72dbec 100755 --- a/hack/generate_manifests.sh +++ b/hack/generate_manifests.sh @@ -4,19 +4,32 @@ set -ex CRD_OPTIONS="$1" PKGS="$2" +GENS="$3" IFS=" " read -r -a PKGS <<< "${PKGS}" KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. cd "${KUBE_ROOT}" || exit for PKG in "${PKGS[@]}"; do - echo "Generating manifests for ${PKG}" - if [[ "$PKG" =~ /\*$ ]]; then - PKG=${PKG%??} - DIR=$(go list -e -test=false -export=false -deps=false -find=false -tags ignore_autogenerated -f "{{.Dir}}" "kubesphere.io/api/${PKG}") - # shellcheck disable=SC2010 - ls -1 -F "${DIR}" | grep '/$' | xargs -n 1 -I{} go run ./vendor/sigs.k8s.io/controller-tools/cmd/controller-gen/main.go object:headerFile=./hack/boilerplate.go.txt paths=kubesphere.io/api/"${PKG}"/{} rbac:roleName=controller-perms "${CRD_OPTIONS}" output:crd:artifacts:config=config/crds + if grep -qw "deepcopy" <<<"${GENS}"; then + echo "Generating deepcopy for ${PKG}" + if [[ "$PKG" =~ /\*$ ]]; then + PKG=${PKG%??} + DIR=$(go list -e -test=false -export=false -deps=false -find=false -tags ignore_autogenerated -f "{{.Dir}}" "kubesphere.io/api/${PKG}") + # shellcheck disable=SC2010 + ls -1 -F "${DIR}" | grep '/$' | xargs -n 1 -I{} go run ./vendor/sigs.k8s.io/controller-tools/cmd/controller-gen/main.go object:headerFile=./hack/boilerplate.go.txt paths=kubesphere.io/api/"${PKG}"/{} + else + go run ./vendor/sigs.k8s.io/controller-tools/cmd/controller-gen/main.go object:headerFile=./hack/boilerplate.go.txt paths=kubesphere.io/api/"${PKG}" + fi else - go run ./vendor/sigs.k8s.io/controller-tools/cmd/controller-gen/main.go object:headerFile=./hack/boilerplate.go.txt paths=kubesphere.io/api/"${PKG}" rbac:roleName=controller-perms "${CRD_OPTIONS}" output:crd:artifacts:config=config/crds + echo "Generating manifests for ${PKG}" + if [[ "$PKG" =~ /\*$ ]]; then + PKG=${PKG%??} + DIR=$(go list -e -test=false -export=false -deps=false -find=false -tags ignore_autogenerated -f "{{.Dir}}" "kubesphere.io/api/${PKG}") + # shellcheck disable=SC2010 + ls -1 -F "${DIR}" | grep '/$' | xargs -n 1 -I{} go run ./vendor/sigs.k8s.io/controller-tools/cmd/controller-gen/main.go object:headerFile=./hack/boilerplate.go.txt paths=kubesphere.io/api/"${PKG}"/{} rbac:roleName=controller-perms "${CRD_OPTIONS}" output:crd:artifacts:config=config/crds + else + go run ./vendor/sigs.k8s.io/controller-tools/cmd/controller-gen/main.go object:headerFile=./hack/boilerplate.go.txt paths=kubesphere.io/api/"${PKG}" rbac:roleName=controller-perms "${CRD_OPTIONS}" output:crd:artifacts:config=config/crds + fi fi done diff --git a/hack/update-goimports.sh b/hack/update-goimports.sh index 91daddcd3..a092a6242 100755 --- a/hack/update-goimports.sh +++ b/hack/update-goimports.sh @@ -30,6 +30,6 @@ fi cd "${KUBE_ROOT}" || exit 1 -IFS=$'\n' read -r -d '' -a files < <( find . -type f -name '*.go' -not -path "./vendor/*" -not -path "./pkg/client/*" && printf '\0' ) +IFS=$'\n' read -r -d '' -a files < <( find . -type f -name '*.go' -not -path "./vendor/*" -not -path "./pkg/client/*" -not -name "zz_generated.deepcopy.go" && printf '\0' ) "goimports" -w -local kubesphere.io/kubesphere "${files[@]}" diff --git a/hack/verify-goimports.sh b/hack/verify-goimports.sh index da818a95a..4aaa12d2d 100755 --- a/hack/verify-goimports.sh +++ b/hack/verify-goimports.sh @@ -30,7 +30,7 @@ fi cd "${KUBE_ROOT}" || exit 1 -IFS=$'\n' read -r -d '' -a files < <( find . -type f -name '*.go' -not -path "./vendor/*" -not -path "./pkg/apis/*" -not -path "./pkg/client/*" && printf '\0' ) +IFS=$'\n' read -r -d '' -a files < <( find . -type f -name '*.go' -not -path "./vendor/*" -not -path "./pkg/apis/*" -not -path "./pkg/client/*" -not -name "zz_generated.deepcopy.go" && printf '\0' ) output=$(goimports -local kubesphere.io/kubesphere -l "${files[@]}") diff --git a/kube/plugin/pkg/admission/resourcequota/apis/resourcequota/types.go b/kube/plugin/pkg/admission/resourcequota/apis/resourcequota/types.go index a20d0b0d2..d92f86532 100644 --- a/kube/plugin/pkg/admission/resourcequota/apis/resourcequota/types.go +++ b/kube/plugin/pkg/admission/resourcequota/apis/resourcequota/types.go @@ -23,7 +23,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // Configuration provides configuration for the ResourceQuota admission controller. type Configuration struct { diff --git a/staging/src/kubesphere.io/api/alerting/v2beta1/doc.go b/staging/src/kubesphere.io/api/alerting/v2beta1/doc.go index da1476491..993ab3f33 100644 --- a/staging/src/kubesphere.io/api/alerting/v2beta1/doc.go +++ b/staging/src/kubesphere.io/api/alerting/v2beta1/doc.go @@ -16,5 +16,5 @@ limitations under the License. // Package v2beta1 contains API Schema definitions for the alerting v2beta1 API group // +groupName=alerting.kubesphere.io -// +k8s:deepcopy-gen=package,register +// +kubebuilder:object:generate=true package v2beta1 diff --git a/staging/src/kubesphere.io/api/alerting/v2beta1/rulegroup_types.go b/staging/src/kubesphere.io/api/alerting/v2beta1/rulegroup_types.go index 8084c0ac7..e5f28da49 100644 --- a/staging/src/kubesphere.io/api/alerting/v2beta1/rulegroup_types.go +++ b/staging/src/kubesphere.io/api/alerting/v2beta1/rulegroup_types.go @@ -567,11 +567,10 @@ type RuleGroupStatus struct { // Important: Run "make" to regenerate code after modifying this file } -//+kubebuilder:object:root=true //+kubebuilder:subresource:status // +genclient // +k8s:openapi-gen=true -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // RuleGroup is the Schema for the RuleGroup API type RuleGroup struct { @@ -582,8 +581,7 @@ type RuleGroup struct { Status RuleGroupStatus `json:"status,omitempty"` } -//+kubebuilder:object:root=true -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // RuleGroupList contains a list of RuleGroup type RuleGroupList struct { @@ -606,11 +604,10 @@ type ClusterRuleGroupStatus struct { // Important: Run "make" to regenerate code after modifying this file } -//+kubebuilder:object:root=true +// +kubebuilder:object:root=true //+kubebuilder:subresource:status // +genclient // +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +kubebuilder:resource:scope=Cluster // ClusterRuleGroup is the Schema for the ClusterRuleGroup API @@ -622,8 +619,7 @@ type ClusterRuleGroup struct { Status ClusterRuleGroupStatus `json:"status,omitempty"` } -//+kubebuilder:object:root=true -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // ClusterRuleGroupList contains a list of ClusterRuleGroup type ClusterRuleGroupList struct { @@ -646,11 +642,10 @@ type GlobalRuleGroupStatus struct { // Important: Run "make" to regenerate code after modifying this file } -//+kubebuilder:object:root=true +// +kubebuilder:object:root=true //+kubebuilder:subresource:status // +genclient // +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +kubebuilder:resource:scope=Cluster // GlobalRuleGroup is the Schema for the GlobalRuleGroup API @@ -662,8 +657,7 @@ type GlobalRuleGroup struct { Status GlobalRuleGroupStatus `json:"status,omitempty"` } -//+kubebuilder:object:root=true -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // GlobalRuleGroupList contains a list of GlobalRuleGroup type GlobalRuleGroupList struct { diff --git a/staging/src/kubesphere.io/api/application/v1alpha1/doc.go b/staging/src/kubesphere.io/api/application/v1alpha1/doc.go index 745b9bf45..6f54a65b1 100644 --- a/staging/src/kubesphere.io/api/application/v1alpha1/doc.go +++ b/staging/src/kubesphere.io/api/application/v1alpha1/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// +k8s:deepcopy-gen=package,register +// +kubebuilder:object:generate=true // +groupName=application.kubesphere.io package v1alpha1 diff --git a/staging/src/kubesphere.io/api/application/v1alpha1/helmapplication_types.go b/staging/src/kubesphere.io/api/application/v1alpha1/helmapplication_types.go index c64ddd789..add337cf9 100644 --- a/staging/src/kubesphere.io/api/application/v1alpha1/helmapplication_types.go +++ b/staging/src/kubesphere.io/api/application/v1alpha1/helmapplication_types.go @@ -56,7 +56,6 @@ type HelmApplicationStatus struct { StatusTime *metav1.Time `json:"statusTime"` } -// +kubebuilder:object:root=true // +kubebuilder:resource:scope=Cluster,shortName=happ // +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="application name",type=string,JSONPath=`.spec.name` @@ -65,7 +64,7 @@ type HelmApplicationStatus struct { // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" // +genclient // +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // HelmApplication is the Schema for the helmapplications API type HelmApplication struct { @@ -77,7 +76,6 @@ type HelmApplication struct { } // +kubebuilder:object:root=true -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // HelmApplicationList contains a list of HelmApplication type HelmApplicationList struct { diff --git a/staging/src/kubesphere.io/api/application/v1alpha1/helmapplicationversion_types.go b/staging/src/kubesphere.io/api/application/v1alpha1/helmapplicationversion_types.go index 6990be2dd..56eaa0dcc 100644 --- a/staging/src/kubesphere.io/api/application/v1alpha1/helmapplicationversion_types.go +++ b/staging/src/kubesphere.io/api/application/v1alpha1/helmapplicationversion_types.go @@ -64,7 +64,7 @@ type HelmApplicationVersionStatus struct { // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" // +genclient // +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // HelmApplicationVersion is the Schema for the helmapplicationversions API type HelmApplicationVersion struct { @@ -166,7 +166,7 @@ type Dependency struct { } // +kubebuilder:object:root=true -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // HelmApplicationVersionList contains a list of HelmApplicationVersion type HelmApplicationVersionList struct { diff --git a/staging/src/kubesphere.io/api/application/v1alpha1/helmcategory_types.go b/staging/src/kubesphere.io/api/application/v1alpha1/helmcategory_types.go index 6af0e2155..17cafdfc0 100644 --- a/staging/src/kubesphere.io/api/application/v1alpha1/helmcategory_types.go +++ b/staging/src/kubesphere.io/api/application/v1alpha1/helmcategory_types.go @@ -35,7 +35,6 @@ type HelmCategorySpec struct { Locale string `json:"locale,omitempty"` } -// +kubebuilder:object:root=true // +kubebuilder:resource:scope=Cluster,shortName=hctg // +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="name",type=string,JSONPath=`.spec.name` @@ -43,7 +42,7 @@ type HelmCategorySpec struct { // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" // +genclient // +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // HelmCategory is the Schema for the helmcategories API type HelmCategory struct { @@ -60,7 +59,6 @@ type HelmCategoryStatus struct { } // +kubebuilder:object:root=true -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // HelmCategoryList contains a list of HelmCategory type HelmCategoryList struct { diff --git a/staging/src/kubesphere.io/api/application/v1alpha1/helmrelease_types.go b/staging/src/kubesphere.io/api/application/v1alpha1/helmrelease_types.go index 4dbb20b5e..2f317478e 100644 --- a/staging/src/kubesphere.io/api/application/v1alpha1/helmrelease_types.go +++ b/staging/src/kubesphere.io/api/application/v1alpha1/helmrelease_types.go @@ -91,7 +91,7 @@ type HelmReleaseStatus struct { // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" // +genclient // +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // HelmRelease is the Schema for the helmreleases API type HelmRelease struct { @@ -103,7 +103,7 @@ type HelmRelease struct { } // +kubebuilder:object:root=true -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // HelmReleaseList contains a list of HelmRelease type HelmReleaseList struct { diff --git a/staging/src/kubesphere.io/api/application/v1alpha1/helmrepo_types.go b/staging/src/kubesphere.io/api/application/v1alpha1/helmrepo_types.go index 56075dfa6..bd85d12b0 100644 --- a/staging/src/kubesphere.io/api/application/v1alpha1/helmrepo_types.go +++ b/staging/src/kubesphere.io/api/application/v1alpha1/helmrepo_types.go @@ -99,7 +99,7 @@ type HelmRepoStatus struct { // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" // +genclient // +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // HelmRepo is the Schema for the helmrepoes API type HelmRepo struct { @@ -111,7 +111,7 @@ type HelmRepo struct { } // +kubebuilder:object:root=true -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // HelmRepoList contains a list of HelmRepo type HelmRepoList struct { diff --git a/staging/src/kubesphere.io/api/application/v1alpha1/zz_generated.deepcopy.go b/staging/src/kubesphere.io/api/application/v1alpha1/zz_generated.deepcopy.go index e574c6759..7def43195 100644 --- a/staging/src/kubesphere.io/api/application/v1alpha1/zz_generated.deepcopy.go +++ b/staging/src/kubesphere.io/api/application/v1alpha1/zz_generated.deepcopy.go @@ -17,7 +17,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by deepcopy-gen. DO NOT EDIT. +// Code generated by controller-gen. DO NOT EDIT. package v1alpha1 @@ -29,7 +29,6 @@ import ( func (in *Audit) DeepCopyInto(out *Audit) { *out = *in in.Time.DeepCopyInto(&out.Time) - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Audit. @@ -50,7 +49,6 @@ func (in *Dependency) DeepCopyInto(out *Dependency) { *out = make([]string, len(*in)) copy(*out, *in) } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Dependency. @@ -70,7 +68,6 @@ func (in *HelmApplication) DeepCopyInto(out *HelmApplication) { in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) in.Status.DeepCopyInto(&out.Status) - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmApplication. @@ -103,7 +100,6 @@ func (in *HelmApplicationList) DeepCopyInto(out *HelmApplicationList) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmApplicationList. @@ -132,7 +128,6 @@ func (in *HelmApplicationSpec) DeepCopyInto(out *HelmApplicationSpec) { *out = make([]string, len(*in)) copy(*out, *in) } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmApplicationSpec. @@ -156,7 +151,6 @@ func (in *HelmApplicationStatus) DeepCopyInto(out *HelmApplicationStatus) { in, out := &in.StatusTime, &out.StatusTime *out = (*in).DeepCopy() } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmApplicationStatus. @@ -176,7 +170,6 @@ func (in *HelmApplicationVersion) DeepCopyInto(out *HelmApplicationVersion) { in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) in.Status.DeepCopyInto(&out.Status) - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmApplicationVersion. @@ -209,7 +202,6 @@ func (in *HelmApplicationVersionList) DeepCopyInto(out *HelmApplicationVersionLi (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmApplicationVersionList. @@ -252,7 +244,6 @@ func (in *HelmApplicationVersionSpec) DeepCopyInto(out *HelmApplicationVersionSp in, out := &in.Created, &out.Created *out = (*in).DeepCopy() } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmApplicationVersionSpec. @@ -275,7 +266,6 @@ func (in *HelmApplicationVersionStatus) DeepCopyInto(out *HelmApplicationVersion (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmApplicationVersionStatus. @@ -295,7 +285,6 @@ func (in *HelmCategory) DeepCopyInto(out *HelmCategory) { in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) out.Spec = in.Spec out.Status = in.Status - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmCategory. @@ -328,7 +317,6 @@ func (in *HelmCategoryList) DeepCopyInto(out *HelmCategoryList) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmCategoryList. @@ -352,7 +340,6 @@ func (in *HelmCategoryList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *HelmCategorySpec) DeepCopyInto(out *HelmCategorySpec) { *out = *in - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmCategorySpec. @@ -368,7 +355,6 @@ func (in *HelmCategorySpec) DeepCopy() *HelmCategorySpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *HelmCategoryStatus) DeepCopyInto(out *HelmCategoryStatus) { *out = *in - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmCategoryStatus. @@ -388,7 +374,6 @@ func (in *HelmRelease) DeepCopyInto(out *HelmRelease) { in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) in.Status.DeepCopyInto(&out.Status) - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmRelease. @@ -413,7 +398,6 @@ func (in *HelmRelease) DeepCopyObject() runtime.Object { func (in *HelmReleaseDeployStatus) DeepCopyInto(out *HelmReleaseDeployStatus) { *out = *in in.Time.DeepCopyInto(&out.Time) - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmReleaseDeployStatus. @@ -438,7 +422,6 @@ func (in *HelmReleaseList) DeepCopyInto(out *HelmReleaseList) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmReleaseList. @@ -467,7 +450,6 @@ func (in *HelmReleaseSpec) DeepCopyInto(out *HelmReleaseSpec) { *out = make([]byte, len(*in)) copy(*out, *in) } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmReleaseSpec. @@ -495,7 +477,6 @@ func (in *HelmReleaseStatus) DeepCopyInto(out *HelmReleaseStatus) { in, out := &in.LastDeployed, &out.LastDeployed *out = (*in).DeepCopy() } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmReleaseStatus. @@ -515,7 +496,6 @@ func (in *HelmRepo) DeepCopyInto(out *HelmRepo) { in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) in.Status.DeepCopyInto(&out.Status) - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmRepo. @@ -545,7 +525,6 @@ func (in *HelmRepoCredential) DeepCopyInto(out *HelmRepoCredential) { **out = **in } out.S3Config = in.S3Config - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmRepoCredential. @@ -570,7 +549,6 @@ func (in *HelmRepoList) DeepCopyInto(out *HelmRepoList) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmRepoList. @@ -595,7 +573,6 @@ func (in *HelmRepoList) DeepCopyObject() runtime.Object { func (in *HelmRepoSpec) DeepCopyInto(out *HelmRepoSpec) { *out = *in in.Credential.DeepCopyInto(&out.Credential) - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmRepoSpec. @@ -622,7 +599,6 @@ func (in *HelmRepoStatus) DeepCopyInto(out *HelmRepoStatus) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmRepoStatus. @@ -642,7 +618,6 @@ func (in *HelmRepoSyncState) DeepCopyInto(out *HelmRepoSyncState) { in, out := &in.SyncTime, &out.SyncTime *out = (*in).DeepCopy() } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmRepoSyncState. @@ -658,7 +633,6 @@ func (in *HelmRepoSyncState) DeepCopy() *HelmRepoSyncState { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Maintainer) DeepCopyInto(out *Maintainer) { *out = *in - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Maintainer. @@ -713,7 +687,6 @@ func (in *Metadata) DeepCopyInto(out *Metadata) { } } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Metadata. @@ -729,7 +702,6 @@ func (in *Metadata) DeepCopy() *Metadata { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *S3Config) DeepCopyInto(out *S3Config) { *out = *in - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S3Config. diff --git a/staging/src/kubesphere.io/api/auditing/v1alpha1/register.go b/staging/src/kubesphere.io/api/auditing/v1alpha1/register.go index 4e31bcce5..a8c72685f 100644 --- a/staging/src/kubesphere.io/api/auditing/v1alpha1/register.go +++ b/staging/src/kubesphere.io/api/auditing/v1alpha1/register.go @@ -17,7 +17,7 @@ limitations under the License. // NOTE: Boilerplate only. Ignore this file. // Package v1alpha1 contains API Schema definitions for the audit v1alpha1 API group -// +k8s:deepcopy-gen=package,register +// +kubebuilder:object:generate=true // +groupName=auditing.kubesphere.io package v1alpha1 diff --git a/staging/src/kubesphere.io/api/auditing/v1alpha1/rule_types.go b/staging/src/kubesphere.io/api/auditing/v1alpha1/rule_types.go index a7add58ef..8969ff28e 100644 --- a/staging/src/kubesphere.io/api/auditing/v1alpha1/rule_types.go +++ b/staging/src/kubesphere.io/api/auditing/v1alpha1/rule_types.go @@ -65,7 +65,6 @@ type RuleStatus struct { // +genclient:noStatus // +genclient:nonNamespaced // +kubebuilder:object:root=true -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // Rule is the Schema for the rules API type Rule struct { @@ -77,7 +76,6 @@ type Rule struct { } // +kubebuilder:object:root=true -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // AuditRuleList contains a list of Rule type RuleList struct { diff --git a/staging/src/kubesphere.io/api/auditing/v1alpha1/webhook_types.go b/staging/src/kubesphere.io/api/auditing/v1alpha1/webhook_types.go index 32ee86d13..bae321637 100644 --- a/staging/src/kubesphere.io/api/auditing/v1alpha1/webhook_types.go +++ b/staging/src/kubesphere.io/api/auditing/v1alpha1/webhook_types.go @@ -201,7 +201,7 @@ type WebhookStatus struct { // +genclient:noStatus // +genclient:nonNamespaced // +kubebuilder:object:root=true -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // Webhook is the Schema for the webhooks API type Webhook struct { @@ -213,7 +213,7 @@ type Webhook struct { } // +kubebuilder:object:root=true -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // WebhookList contains a list of Webhook type WebhookList struct { diff --git a/staging/src/kubesphere.io/api/cluster/v1alpha1/cluster_types.go b/staging/src/kubesphere.io/api/cluster/v1alpha1/cluster_types.go index 09e155e0f..e4c967611 100644 --- a/staging/src/kubesphere.io/api/cluster/v1alpha1/cluster_types.go +++ b/staging/src/kubesphere.io/api/cluster/v1alpha1/cluster_types.go @@ -175,7 +175,7 @@ type ClusterStatus struct { } // +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +k8s:openapi-gen=true // +genclient:nonNamespaced // +kubebuilder:printcolumn:name="Federated",type="boolean",JSONPath=".spec.joinFederation" @@ -193,7 +193,7 @@ type Cluster struct { Status ClusterStatus `json:"status,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true type ClusterList struct { metav1.TypeMeta `json:",inline"` diff --git a/staging/src/kubesphere.io/api/cluster/v1alpha1/doc.go b/staging/src/kubesphere.io/api/cluster/v1alpha1/doc.go index 4c691c0a1..80d16b8c5 100644 --- a/staging/src/kubesphere.io/api/cluster/v1alpha1/doc.go +++ b/staging/src/kubesphere.io/api/cluster/v1alpha1/doc.go @@ -16,7 +16,7 @@ limitations under the License. // Package v1alpha1 contains API Schema definitions for the tower v1alpha1 API group // +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package,register +// +kubebuilder:object:generate=true // +k8s:conversion-gen=kubesphere.io/api/cluster // +k8s:defaulter-gen=TypeMeta // +groupName=cluster.kubesphere.io diff --git a/staging/src/kubesphere.io/api/cluster/v1alpha1/register.go b/staging/src/kubesphere.io/api/cluster/v1alpha1/register.go index bec2c01b7..ee83e5270 100644 --- a/staging/src/kubesphere.io/api/cluster/v1alpha1/register.go +++ b/staging/src/kubesphere.io/api/cluster/v1alpha1/register.go @@ -31,7 +31,7 @@ limitations under the License. // Package v1alpha1 contains API Schema definitions for the tower v1alpha1 API group // +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package,register +// +kubebuilder:object:generate=true // +k8s:defaulter-gen=TypeMeta // +groupName=cluster.kubesphere.io package v1alpha1 diff --git a/staging/src/kubesphere.io/api/cluster/v1alpha1/zz_generated.deepcopy.go b/staging/src/kubesphere.io/api/cluster/v1alpha1/zz_generated.deepcopy.go index a73828289..f099f174d 100644 --- a/staging/src/kubesphere.io/api/cluster/v1alpha1/zz_generated.deepcopy.go +++ b/staging/src/kubesphere.io/api/cluster/v1alpha1/zz_generated.deepcopy.go @@ -17,7 +17,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by deepcopy-gen. DO NOT EDIT. +// Code generated by controller-gen. DO NOT EDIT. package v1alpha1 @@ -32,7 +32,6 @@ func (in *Cluster) DeepCopyInto(out *Cluster) { in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) in.Status.DeepCopyInto(&out.Status) - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster. @@ -58,7 +57,6 @@ func (in *ClusterCondition) DeepCopyInto(out *ClusterCondition) { *out = *in in.LastUpdateTime.DeepCopyInto(&out.LastUpdateTime) in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterCondition. @@ -83,7 +81,6 @@ func (in *ClusterList) DeepCopyInto(out *ClusterList) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterList. @@ -108,7 +105,6 @@ func (in *ClusterList) DeepCopyObject() runtime.Object { func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) { *out = *in in.Connection.DeepCopyInto(&out.Connection) - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSpec. @@ -148,7 +144,6 @@ func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus) { (*out)[key] = val } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterStatus. @@ -169,7 +164,6 @@ func (in *Connection) DeepCopyInto(out *Connection) { *out = make([]byte, len(*in)) copy(*out, *in) } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Connection. diff --git a/staging/src/kubesphere.io/api/devops/v1alpha1/doc.go b/staging/src/kubesphere.io/api/devops/v1alpha1/doc.go index edab8bea8..acdd20e51 100644 --- a/staging/src/kubesphere.io/api/devops/v1alpha1/doc.go +++ b/staging/src/kubesphere.io/api/devops/v1alpha1/doc.go @@ -16,7 +16,7 @@ limitations under the License. // Package v1alpha1 contains API Schema definitions for the devops v1alpha1 API group // +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package,register +// +kubebuilder:object:generate=true // +k8s:conversion-gen=kubesphere.io/api/devops // +k8s:defaulter-gen=TypeMeta // +groupName=devops.kubesphere.io diff --git a/staging/src/kubesphere.io/api/devops/v1alpha1/register.go b/staging/src/kubesphere.io/api/devops/v1alpha1/register.go index de61e6424..13ea59af1 100644 --- a/staging/src/kubesphere.io/api/devops/v1alpha1/register.go +++ b/staging/src/kubesphere.io/api/devops/v1alpha1/register.go @@ -18,7 +18,7 @@ limitations under the License. // Package v1alpha1 contains API Schema definitions for the devops v1alpha1 API group // +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package,register +// +kubebuilder:object:generate=true // +k8s:conversion-gen=kubesphere.io/api/devops // +k8s:defaulter-gen=TypeMeta // +groupName=devops.kubesphere.io diff --git a/staging/src/kubesphere.io/api/devops/v1alpha1/s2ibinary_types.go b/staging/src/kubesphere.io/api/devops/v1alpha1/s2ibinary_types.go index c8945830e..97ddd3709 100644 --- a/staging/src/kubesphere.io/api/devops/v1alpha1/s2ibinary_types.go +++ b/staging/src/kubesphere.io/api/devops/v1alpha1/s2ibinary_types.go @@ -61,7 +61,7 @@ type S2iBinaryStatus struct { } // +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // S2iBinary is the Schema for the s2ibinaries API // +k8s:openapi-gen=true @@ -77,7 +77,7 @@ type S2iBinary struct { Status S2iBinaryStatus `json:"status,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // S2iBinaryList contains a list of S2iBinary type S2iBinaryList struct { diff --git a/staging/src/kubesphere.io/api/devops/v1alpha1/s2ibuilder_types.go b/staging/src/kubesphere.io/api/devops/v1alpha1/s2ibuilder_types.go index 80525c091..834b8d579 100644 --- a/staging/src/kubesphere.io/api/devops/v1alpha1/s2ibuilder_types.go +++ b/staging/src/kubesphere.io/api/devops/v1alpha1/s2ibuilder_types.go @@ -461,7 +461,7 @@ type S2iBuilderStatus struct { } // +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // S2iBuilder is the Schema for the s2ibuilders API // +k8s:openapi-gen=true @@ -479,7 +479,7 @@ type S2iBuilder struct { Status S2iBuilderStatus `json:"status,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // S2iBuilderList contains a list of S2iBuilder type S2iBuilderList struct { diff --git a/staging/src/kubesphere.io/api/devops/v1alpha1/s2ibuildertemplate_types.go b/staging/src/kubesphere.io/api/devops/v1alpha1/s2ibuildertemplate_types.go index 3925790e9..30f655cfa 100644 --- a/staging/src/kubesphere.io/api/devops/v1alpha1/s2ibuildertemplate_types.go +++ b/staging/src/kubesphere.io/api/devops/v1alpha1/s2ibuildertemplate_types.go @@ -96,7 +96,7 @@ type S2iBuilderTemplateStatus struct { // +genclient // +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // S2iBuilderTemplate is the Schema for the s2ibuildertemplates API // +k8s:openapi-gen=true @@ -112,7 +112,7 @@ type S2iBuilderTemplate struct { Status S2iBuilderTemplateStatus `json:"status,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // S2iBuilderTemplateList contains a list of S2iBuilderTemplate type S2iBuilderTemplateList struct { diff --git a/staging/src/kubesphere.io/api/devops/v1alpha1/s2irun_types.go b/staging/src/kubesphere.io/api/devops/v1alpha1/s2irun_types.go index 3255f3cd0..8dde962e1 100644 --- a/staging/src/kubesphere.io/api/devops/v1alpha1/s2irun_types.go +++ b/staging/src/kubesphere.io/api/devops/v1alpha1/s2irun_types.go @@ -108,7 +108,7 @@ type S2iBuildSource struct { } // +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // S2iRun is the Schema for the s2iruns API // +k8s:openapi-gen=true @@ -127,7 +127,7 @@ type S2iRun struct { Status S2iRunStatus `json:"status,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // S2iRunList contains a list of S2iRun type S2iRunList struct { diff --git a/staging/src/kubesphere.io/api/devops/v1alpha3/devopsproject_types.go b/staging/src/kubesphere.io/api/devops/v1alpha3/devopsproject_types.go index 80e04b6b3..fbbdba25d 100644 --- a/staging/src/kubesphere.io/api/devops/v1alpha3/devopsproject_types.go +++ b/staging/src/kubesphere.io/api/devops/v1alpha3/devopsproject_types.go @@ -51,7 +51,7 @@ type DevOpsProjectStatus struct { // +genclient // +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // DevOpsProject is the Schema for the devopsprojects API // +kubebuilder:resource:categories="devops",scope="Cluster" @@ -64,7 +64,7 @@ type DevOpsProject struct { Status DevOpsProjectStatus `json:"status,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // DevOpsProjectList contains a list of DevOpsProject type DevOpsProjectList struct { diff --git a/staging/src/kubesphere.io/api/devops/v1alpha3/doc.go b/staging/src/kubesphere.io/api/devops/v1alpha3/doc.go index 6dc3f9dee..4f7a4a4c9 100644 --- a/staging/src/kubesphere.io/api/devops/v1alpha3/doc.go +++ b/staging/src/kubesphere.io/api/devops/v1alpha3/doc.go @@ -16,7 +16,7 @@ limitations under the License. // Package v1alpha3 contains API Schema definitions for the devops v1alpha3 API group // +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package,register +// +kubebuilder:object:generate=true // +k8s:conversion-gen=kubesphere.io/api/devops // +k8s:defaulter-gen=TypeMeta // +groupName=devops.kubesphere.io diff --git a/staging/src/kubesphere.io/api/devops/v1alpha3/pipeline_types.go b/staging/src/kubesphere.io/api/devops/v1alpha3/pipeline_types.go index 25f4282ba..d3eaf5aa8 100644 --- a/staging/src/kubesphere.io/api/devops/v1alpha3/pipeline_types.go +++ b/staging/src/kubesphere.io/api/devops/v1alpha3/pipeline_types.go @@ -52,7 +52,7 @@ type PipelineStatus struct { } // +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // Pipeline is the Schema for the pipelines API // +k8s:openapi-gen=true @@ -64,7 +64,7 @@ type Pipeline struct { Status PipelineStatus `json:"status,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // PipelineList contains a list of Pipeline type PipelineList struct { diff --git a/staging/src/kubesphere.io/api/devops/v1alpha3/register.go b/staging/src/kubesphere.io/api/devops/v1alpha3/register.go index 513d995e0..1ea6d8e69 100644 --- a/staging/src/kubesphere.io/api/devops/v1alpha3/register.go +++ b/staging/src/kubesphere.io/api/devops/v1alpha3/register.go @@ -18,7 +18,7 @@ limitations under the License. // Package v1alpha3 contains API Schema definitions for the devops v1alpha3 API group // +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package,register +// +kubebuilder:object:generate=true // +k8s:conversion-gen=kubesphere.io/api/devops // +k8s:defaulter-gen=TypeMeta // +groupName=devops.kubesphere.io diff --git a/staging/src/kubesphere.io/api/iam/v1alpha2/doc.go b/staging/src/kubesphere.io/api/iam/v1alpha2/doc.go index 7978d580d..92ff421c5 100644 --- a/staging/src/kubesphere.io/api/iam/v1alpha2/doc.go +++ b/staging/src/kubesphere.io/api/iam/v1alpha2/doc.go @@ -16,7 +16,7 @@ limitations under the License. // Package v1alpha2 contains API Schema definitions for the iam v1alpha2 API group // +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package,register +// +kubebuilder:object:generate=true // +k8s:conversion-gen=kubesphere.io/api/iam // +k8s:defaulter-gen=TypeMeta // +groupName=iam.kubesphere.io diff --git a/staging/src/kubesphere.io/api/iam/v1alpha2/group_types.go b/staging/src/kubesphere.io/api/iam/v1alpha2/group_types.go index 179c64132..0d80e4ef0 100644 --- a/staging/src/kubesphere.io/api/iam/v1alpha2/group_types.go +++ b/staging/src/kubesphere.io/api/iam/v1alpha2/group_types.go @@ -38,7 +38,7 @@ type GroupStatus struct { // +genclient:nonNamespaced // +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +k8s:openapi-gen=true // +kubebuilder:printcolumn:name="Workspace",type="string",JSONPath=".metadata.labels.kubesphere\\.io/workspace" // +kubebuilder:resource:categories="group",scope="Cluster" @@ -52,7 +52,7 @@ type Group struct { Status GroupStatus `json:"status,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +genclient:nonNamespaced // GroupList contains a list of Group diff --git a/staging/src/kubesphere.io/api/iam/v1alpha2/groupbinding_types.go b/staging/src/kubesphere.io/api/iam/v1alpha2/groupbinding_types.go index 3ad07762c..8ce14c76e 100644 --- a/staging/src/kubesphere.io/api/iam/v1alpha2/groupbinding_types.go +++ b/staging/src/kubesphere.io/api/iam/v1alpha2/groupbinding_types.go @@ -33,7 +33,7 @@ type GroupRef struct { // +genclient:nonNamespaced // +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +k8s:openapi-gen=true // +kubebuilder:printcolumn:name="Group",type="string",JSONPath=".groupRef.name" // +kubebuilder:printcolumn:name="Users",type="string",JSONPath=".users" @@ -48,7 +48,7 @@ type GroupBinding struct { Users []string `json:"users,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +genclient:nonNamespaced // GroupBindingList contains a list of GroupBinding diff --git a/staging/src/kubesphere.io/api/iam/v1alpha2/types.go b/staging/src/kubesphere.io/api/iam/v1alpha2/types.go index 835ac9ce6..5a6243cdf 100644 --- a/staging/src/kubesphere.io/api/iam/v1alpha2/types.go +++ b/staging/src/kubesphere.io/api/iam/v1alpha2/types.go @@ -98,7 +98,7 @@ const ( // +kubebuilder:printcolumn:name="Email",type="string",JSONPath=".spec.email" // +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.state" // +kubebuilder:resource:categories="iam",scope="Cluster" -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true type User struct { metav1.TypeMeta `json:",inline"` // +optional @@ -176,7 +176,7 @@ type UserStatus struct { } // +kubebuilder:object:root=true -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // UserList contains a list of User type UserList struct { metav1.TypeMeta `json:",inline"` @@ -190,7 +190,7 @@ type UserList struct { // +genclient:nonNamespaced // +kubebuilder:object:root=true // +kubebuilder:resource:categories="iam",scope="Cluster" -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true type GlobalRole struct { metav1.TypeMeta `json:",inline"` // +optional @@ -202,7 +202,7 @@ type GlobalRole struct { } // +kubebuilder:object:root=true -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // GlobalRoleList contains a list of GlobalRole type GlobalRoleList struct { metav1.TypeMeta `json:",inline"` @@ -215,7 +215,7 @@ type GlobalRoleList struct { // +kubebuilder:object:root=true // +kubebuilder:resource:categories="iam",scope="Cluster" // GlobalRoleBinding is the Schema for the globalrolebindings API -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true type GlobalRoleBinding struct { metav1.TypeMeta `json:",inline"` // +optional @@ -231,7 +231,7 @@ type GlobalRoleBinding struct { } // +kubebuilder:object:root=true -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // GlobalRoleBindingList contains a list of GlobalRoleBinding type GlobalRoleBindingList struct { metav1.TypeMeta `json:",inline"` @@ -247,7 +247,7 @@ type GlobalRoleBindingList struct { // +kubebuilder:printcolumn:name="Workspace",type="string",JSONPath=".metadata.labels.kubesphere\\.io/workspace" // +kubebuilder:printcolumn:name="Alias",type="string",JSONPath=".metadata.annotations.kubesphere\\.io/alias-name" // +kubebuilder:resource:categories="iam",scope="Cluster" -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true type WorkspaceRole struct { metav1.TypeMeta `json:",inline"` // +optional @@ -259,7 +259,7 @@ type WorkspaceRole struct { } // +kubebuilder:object:root=true -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // WorkspaceRoleList contains a list of WorkspaceRole type WorkspaceRoleList struct { metav1.TypeMeta `json:",inline"` @@ -273,7 +273,7 @@ type WorkspaceRoleList struct { // +kubebuilder:printcolumn:name="Workspace",type="string",JSONPath=".metadata.labels.kubesphere\\.io/workspace" // +kubebuilder:resource:categories="iam",scope="Cluster" // WorkspaceRoleBinding is the Schema for the workspacerolebindings API -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true type WorkspaceRoleBinding struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -288,7 +288,7 @@ type WorkspaceRoleBinding struct { } // +kubebuilder:object:root=true -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // WorkspaceRoleBindingList contains a list of WorkspaceRoleBinding type WorkspaceRoleBindingList struct { metav1.TypeMeta `json:",inline"` @@ -300,7 +300,7 @@ type WorkspaceRoleBindingList struct { // +genclient:nonNamespaced // +kubebuilder:object:root=true // +kubebuilder:resource:categories="iam",scope="Cluster" -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true type RoleBase struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -310,7 +310,7 @@ type RoleBase struct { } // +kubebuilder:object:root=true -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // RoleBaseList contains a list of RoleBase type RoleBaseList struct { metav1.TypeMeta `json:",inline"` @@ -328,7 +328,7 @@ type RoleBaseList struct { // +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".spec.reason" // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" // +kubebuilder:resource:categories="iam",scope="Cluster" -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true type LoginRecord struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -359,7 +359,7 @@ const ( ) // +kubebuilder:object:root=true -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // LoginRecordList contains a list of LoginRecord type LoginRecordList struct { metav1.TypeMeta `json:",inline"` diff --git a/staging/src/kubesphere.io/api/iam/v1alpha2/zz_generated.deepcopy.go b/staging/src/kubesphere.io/api/iam/v1alpha2/zz_generated.deepcopy.go index 9bf1ab167..b7fd9f799 100644 --- a/staging/src/kubesphere.io/api/iam/v1alpha2/zz_generated.deepcopy.go +++ b/staging/src/kubesphere.io/api/iam/v1alpha2/zz_generated.deepcopy.go @@ -17,31 +17,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by deepcopy-gen. DO NOT EDIT. +// Code generated by controller-gen. DO NOT EDIT. package v1alpha2 import ( - v1 "k8s.io/api/rbac/v1" - runtime "k8s.io/apimachinery/pkg/runtime" + "k8s.io/api/rbac/v1" + "k8s.io/apimachinery/pkg/runtime" ) -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Cluster) DeepCopyInto(out *Cluster) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster. -func (in *Cluster) DeepCopy() *Cluster { - if in == nil { - return nil - } - out := new(Cluster) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ClusterSelector) DeepCopyInto(out *ClusterSelector) { *out = *in @@ -52,7 +36,6 @@ func (in *ClusterSelector) DeepCopyInto(out *ClusterSelector) { (*out)[key] = val } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSelector. @@ -65,117 +48,6 @@ func (in *ClusterSelector) DeepCopy() *ClusterSelector { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FederatedRole) DeepCopyInto(out *FederatedRole) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederatedRole. -func (in *FederatedRole) DeepCopy() *FederatedRole { - if in == nil { - return nil - } - out := new(FederatedRole) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FederatedRoleBinding) DeepCopyInto(out *FederatedRoleBinding) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederatedRoleBinding. -func (in *FederatedRoleBinding) DeepCopy() *FederatedRoleBinding { - if in == nil { - return nil - } - out := new(FederatedRoleBinding) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FederatedRoleBindingSpec) DeepCopyInto(out *FederatedRoleBindingSpec) { - *out = *in - in.Template.DeepCopyInto(&out.Template) - in.Placement.DeepCopyInto(&out.Placement) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederatedRoleBindingSpec. -func (in *FederatedRoleBindingSpec) DeepCopy() *FederatedRoleBindingSpec { - if in == nil { - return nil - } - out := new(FederatedRoleBindingSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FederatedRoleSpec) DeepCopyInto(out *FederatedRoleSpec) { - *out = *in - in.Template.DeepCopyInto(&out.Template) - in.Placement.DeepCopyInto(&out.Placement) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederatedRoleSpec. -func (in *FederatedRoleSpec) DeepCopy() *FederatedRoleSpec { - if in == nil { - return nil - } - out := new(FederatedRoleSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FederatedUser) DeepCopyInto(out *FederatedUser) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederatedUser. -func (in *FederatedUser) DeepCopy() *FederatedUser { - if in == nil { - return nil - } - out := new(FederatedUser) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FederatedUserSpec) DeepCopyInto(out *FederatedUserSpec) { - *out = *in - in.Template.DeepCopyInto(&out.Template) - in.Placement.DeepCopyInto(&out.Placement) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederatedUserSpec. -func (in *FederatedUserSpec) DeepCopy() *FederatedUserSpec { - if in == nil { - return nil - } - out := new(FederatedUserSpec) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GlobalRole) DeepCopyInto(out *GlobalRole) { *out = *in @@ -188,7 +60,6 @@ func (in *GlobalRole) DeepCopyInto(out *GlobalRole) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalRole. @@ -220,7 +91,6 @@ func (in *GlobalRoleBinding) DeepCopyInto(out *GlobalRoleBinding) { copy(*out, *in) } out.RoleRef = in.RoleRef - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalRoleBinding. @@ -253,7 +123,6 @@ func (in *GlobalRoleBindingList) DeepCopyInto(out *GlobalRoleBindingList) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalRoleBindingList. @@ -286,7 +155,6 @@ func (in *GlobalRoleList) DeepCopyInto(out *GlobalRoleList) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalRoleList. @@ -314,7 +182,6 @@ func (in *Group) DeepCopyInto(out *Group) { in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) out.Spec = in.Spec out.Status = in.Status - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Group. @@ -346,7 +213,6 @@ func (in *GroupBinding) DeepCopyInto(out *GroupBinding) { *out = make([]string, len(*in)) copy(*out, *in) } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupBinding. @@ -379,7 +245,6 @@ func (in *GroupBindingList) DeepCopyInto(out *GroupBindingList) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupBindingList. @@ -412,7 +277,6 @@ func (in *GroupList) DeepCopyInto(out *GroupList) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupList. @@ -436,7 +300,6 @@ func (in *GroupList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GroupRef) DeepCopyInto(out *GroupRef) { *out = *in - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupRef. @@ -452,7 +315,6 @@ func (in *GroupRef) DeepCopy() *GroupRef { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GroupSpec) DeepCopyInto(out *GroupSpec) { *out = *in - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupSpec. @@ -468,7 +330,6 @@ func (in *GroupSpec) DeepCopy() *GroupSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GroupStatus) DeepCopyInto(out *GroupStatus) { *out = *in - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupStatus. @@ -487,7 +348,6 @@ func (in *LoginRecord) DeepCopyInto(out *LoginRecord) { out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) out.Spec = in.Spec - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoginRecord. @@ -520,7 +380,6 @@ func (in *LoginRecordList) DeepCopyInto(out *LoginRecordList) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoginRecordList. @@ -544,7 +403,6 @@ func (in *LoginRecordList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *LoginRecordSpec) DeepCopyInto(out *LoginRecordSpec) { *out = *in - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoginRecordSpec. @@ -557,35 +415,12 @@ func (in *LoginRecordSpec) DeepCopy() *LoginRecordSpec { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Placement) DeepCopyInto(out *Placement) { - *out = *in - if in.Clusters != nil { - in, out := &in.Clusters, &out.Clusters - *out = make([]Cluster, len(*in)) - copy(*out, *in) - } - in.ClusterSelector.DeepCopyInto(&out.ClusterSelector) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Placement. -func (in *Placement) DeepCopy() *Placement { - if in == nil { - return nil - } - out := new(Placement) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RoleBase) DeepCopyInto(out *RoleBase) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Role.DeepCopyInto(&out.Role) - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleBase. @@ -618,7 +453,6 @@ func (in *RoleBaseList) DeepCopyInto(out *RoleBaseList) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleBaseList. @@ -639,53 +473,6 @@ func (in *RoleBaseList) DeepCopyObject() runtime.Object { return nil } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RoleBindingTemplate) DeepCopyInto(out *RoleBindingTemplate) { - *out = *in - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.Subjects != nil { - in, out := &in.Subjects, &out.Subjects - *out = make([]v1.Subject, len(*in)) - copy(*out, *in) - } - out.RoleRef = in.RoleRef - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleBindingTemplate. -func (in *RoleBindingTemplate) DeepCopy() *RoleBindingTemplate { - if in == nil { - return nil - } - out := new(RoleBindingTemplate) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RoleTemplate) DeepCopyInto(out *RoleTemplate) { - *out = *in - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.Rules != nil { - in, out := &in.Rules, &out.Rules - *out = make([]v1.PolicyRule, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleTemplate. -func (in *RoleTemplate) DeepCopy() *RoleTemplate { - if in == nil { - return nil - } - out := new(RoleTemplate) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *User) DeepCopyInto(out *User) { *out = *in @@ -693,7 +480,6 @@ func (in *User) DeepCopyInto(out *User) { in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) in.Status.DeepCopyInto(&out.Status) - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new User. @@ -726,7 +512,6 @@ func (in *UserList) DeepCopyInto(out *UserList) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserList. @@ -755,7 +540,6 @@ func (in *UserSpec) DeepCopyInto(out *UserSpec) { *out = make([]string, len(*in)) copy(*out, *in) } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserSpec. @@ -779,7 +563,6 @@ func (in *UserStatus) DeepCopyInto(out *UserStatus) { in, out := &in.LastLoginTime, &out.LastLoginTime *out = (*in).DeepCopy() } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserStatus. @@ -792,25 +575,6 @@ func (in *UserStatus) DeepCopy() *UserStatus { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *UserTemplate) DeepCopyInto(out *UserTemplate) { - *out = *in - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserTemplate. -func (in *UserTemplate) DeepCopy() *UserTemplate { - if in == nil { - return nil - } - out := new(UserTemplate) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *WorkspaceRole) DeepCopyInto(out *WorkspaceRole) { *out = *in @@ -823,7 +587,6 @@ func (in *WorkspaceRole) DeepCopyInto(out *WorkspaceRole) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceRole. @@ -855,7 +618,6 @@ func (in *WorkspaceRoleBinding) DeepCopyInto(out *WorkspaceRoleBinding) { copy(*out, *in) } out.RoleRef = in.RoleRef - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceRoleBinding. @@ -888,7 +650,6 @@ func (in *WorkspaceRoleBindingList) DeepCopyInto(out *WorkspaceRoleBindingList) (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceRoleBindingList. @@ -921,7 +682,6 @@ func (in *WorkspaceRoleList) DeepCopyInto(out *WorkspaceRoleList) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceRoleList. diff --git a/staging/src/kubesphere.io/api/network/calicov3/block_affinity_types.go b/staging/src/kubesphere.io/api/network/calicov3/block_affinity_types.go index 461cfcb9d..a07c17007 100644 --- a/staging/src/kubesphere.io/api/network/calicov3/block_affinity_types.go +++ b/staging/src/kubesphere.io/api/network/calicov3/block_affinity_types.go @@ -21,7 +21,7 @@ import ( ) // +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +genclient:nonNamespaced // +k8s:openapi-gen=true // +kubebuilder:resource:scope=Cluster @@ -31,7 +31,7 @@ type BlockAffinity struct { Spec v3.BlockAffinitySpec `json:"spec,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // BlockAffinityList contains a list of BlockAffinity resources. type BlockAffinityList struct { diff --git a/staging/src/kubesphere.io/api/network/calicov3/doc.go b/staging/src/kubesphere.io/api/network/calicov3/doc.go index 94284e097..daf022d92 100644 --- a/staging/src/kubesphere.io/api/network/calicov3/doc.go +++ b/staging/src/kubesphere.io/api/network/calicov3/doc.go @@ -1,4 +1,4 @@ // API Schema definitions for configuring the installation of Calico and Calico Enterprise -// +k8s:deepcopy-gen=package,register +// +kubebuilder:object:generate=true // +groupName=crd.projectcalico.org package calicov3 diff --git a/staging/src/kubesphere.io/api/network/calicov3/ipamblock_types.go b/staging/src/kubesphere.io/api/network/calicov3/ipamblock_types.go index 254ad3b28..abb840583 100644 --- a/staging/src/kubesphere.io/api/network/calicov3/ipamblock_types.go +++ b/staging/src/kubesphere.io/api/network/calicov3/ipamblock_types.go @@ -23,7 +23,7 @@ import ( ) // +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +genclient:nonNamespaced // +k8s:openapi-gen=true // +kubebuilder:resource:scope=Cluster @@ -33,7 +33,7 @@ type IPAMBlock struct { Spec v3.IPAMBlockSpec `json:"spec,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // IPAMBlockList contains a list of IPAMBlock resources. type IPAMBlockList struct { diff --git a/staging/src/kubesphere.io/api/network/calicov3/ippool_types.go b/staging/src/kubesphere.io/api/network/calicov3/ippool_types.go index 6884b977d..dc4b97715 100644 --- a/staging/src/kubesphere.io/api/network/calicov3/ippool_types.go +++ b/staging/src/kubesphere.io/api/network/calicov3/ippool_types.go @@ -22,7 +22,7 @@ import ( ) // +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +genclient:nonNamespaced // +k8s:openapi-gen=true // +kubebuilder:resource:scope=Cluster @@ -32,7 +32,7 @@ type IPPool struct { Spec v3.IPPoolSpec `json:"spec,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // IPPoolList contains a list of IPPool resources. type IPPoolList struct { diff --git a/staging/src/kubesphere.io/api/network/v1alpha1/doc.go b/staging/src/kubesphere.io/api/network/v1alpha1/doc.go index 0ee11eadd..f519545bb 100644 --- a/staging/src/kubesphere.io/api/network/v1alpha1/doc.go +++ b/staging/src/kubesphere.io/api/network/v1alpha1/doc.go @@ -16,7 +16,7 @@ limitations under the License. // Package v1alpha1 contains API Schema definitions for the network v1alpha1 API group // +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package,register +// +kubebuilder:object:generate=true // +k8s:conversion-gen=kubesphere.io/api/network // +k8s:defaulter-gen=TypeMeta // +groupName=network.kubesphere.io diff --git a/staging/src/kubesphere.io/api/network/v1alpha1/ipamblock_types.go b/staging/src/kubesphere.io/api/network/v1alpha1/ipamblock_types.go index e58143a6e..dbb3fb445 100644 --- a/staging/src/kubesphere.io/api/network/v1alpha1/ipamblock_types.go +++ b/staging/src/kubesphere.io/api/network/v1alpha1/ipamblock_types.go @@ -47,7 +47,7 @@ const ( // +genclient // +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +k8s:openapi-gen=true // +kubebuilder:resource:scope=Cluster type IPAMBlock struct { @@ -72,7 +72,7 @@ type AllocationAttribute struct { AttrSecondary map[string]string `json:"secondary,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +genclient:nonNamespaced type IPAMBlockList struct { metav1.TypeMeta `json:",inline"` diff --git a/staging/src/kubesphere.io/api/network/v1alpha1/ipamhandle_types.go b/staging/src/kubesphere.io/api/network/v1alpha1/ipamhandle_types.go index 465490bda..37fe7384c 100644 --- a/staging/src/kubesphere.io/api/network/v1alpha1/ipamhandle_types.go +++ b/staging/src/kubesphere.io/api/network/v1alpha1/ipamhandle_types.go @@ -34,7 +34,7 @@ const ( // +genclient // +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +k8s:openapi-gen=true // +kubebuilder:resource:scope=Cluster type IPAMHandle struct { @@ -51,7 +51,7 @@ type IPAMHandleSpec struct { Deleted bool `json:"deleted"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +genclient:nonNamespaced type IPAMHandleList struct { metav1.TypeMeta `json:",inline"` diff --git a/staging/src/kubesphere.io/api/network/v1alpha1/ippool_types.go b/staging/src/kubesphere.io/api/network/v1alpha1/ippool_types.go index bb2871cce..2083a91a4 100644 --- a/staging/src/kubesphere.io/api/network/v1alpha1/ippool_types.go +++ b/staging/src/kubesphere.io/api/network/v1alpha1/ippool_types.go @@ -43,7 +43,7 @@ const ( // +genclient // +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +k8s:openapi-gen=true // +kubebuilder:subresource:status // +kubebuilder:resource:scope=Cluster @@ -113,7 +113,7 @@ type IPPoolSpec struct { DNS DNS `json:"dns,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +genclient:nonNamespaced type IPPoolList struct { metav1.TypeMeta `json:",inline"` diff --git a/staging/src/kubesphere.io/api/network/v1alpha1/namespacenetworkpolicy_types.go b/staging/src/kubesphere.io/api/network/v1alpha1/namespacenetworkpolicy_types.go index 202116e4c..97d050a1e 100644 --- a/staging/src/kubesphere.io/api/network/v1alpha1/namespacenetworkpolicy_types.go +++ b/staging/src/kubesphere.io/api/network/v1alpha1/namespacenetworkpolicy_types.go @@ -128,7 +128,7 @@ type NetworkPolicyPeer struct { } // +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // NamespaceNetworkPolicy is the Schema for the namespacenetworkpolicies API // +k8s:openapi-gen=true @@ -140,7 +140,7 @@ type NamespaceNetworkPolicy struct { Spec NamespaceNetworkPolicySpec `json:"spec,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // NamespaceNetworkPolicyList contains a list of NamespaceNetworkPolicy type NamespaceNetworkPolicyList struct { diff --git a/staging/src/kubesphere.io/api/network/v1alpha1/register.go b/staging/src/kubesphere.io/api/network/v1alpha1/register.go index 1e9ebc917..c94447c86 100644 --- a/staging/src/kubesphere.io/api/network/v1alpha1/register.go +++ b/staging/src/kubesphere.io/api/network/v1alpha1/register.go @@ -18,7 +18,7 @@ limitations under the License. // Package v1alpha1 contains API Schema definitions for the network v1alpha1 API group // +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package,register +// +kubebuilder:object:generate=true // +k8s:conversion-gen=kubesphere.io/api/network // +k8s:defaulter-gen=TypeMeta // +groupName=network.kubesphere.io diff --git a/staging/src/kubesphere.io/api/network/v1alpha1/zz_generated.deepcopy.go b/staging/src/kubesphere.io/api/network/v1alpha1/zz_generated.deepcopy.go index 13fee8c04..705b4d40a 100644 --- a/staging/src/kubesphere.io/api/network/v1alpha1/zz_generated.deepcopy.go +++ b/staging/src/kubesphere.io/api/network/v1alpha1/zz_generated.deepcopy.go @@ -17,12 +17,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by deepcopy-gen. DO NOT EDIT. +// Code generated by controller-gen. DO NOT EDIT. package v1alpha1 import ( - v1 "k8s.io/api/networking/v1" + "k8s.io/api/networking/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -36,7 +36,6 @@ func (in *AllocationAttribute) DeepCopyInto(out *AllocationAttribute) { (*out)[key] = val } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllocationAttribute. @@ -67,7 +66,6 @@ func (in *DNS) DeepCopyInto(out *DNS) { *out = make([]string, len(*in)) copy(*out, *in) } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNS. @@ -86,7 +84,6 @@ func (in *IPAMBlock) DeepCopyInto(out *IPAMBlock) { out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMBlock. @@ -119,7 +116,6 @@ func (in *IPAMBlockList) DeepCopyInto(out *IPAMBlockList) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMBlockList. @@ -166,7 +162,6 @@ func (in *IPAMBlockSpec) DeepCopyInto(out *IPAMBlockSpec) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMBlockSpec. @@ -185,7 +180,6 @@ func (in *IPAMHandle) DeepCopyInto(out *IPAMHandle) { out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMHandle. @@ -218,7 +212,6 @@ func (in *IPAMHandleList) DeepCopyInto(out *IPAMHandleList) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMHandleList. @@ -249,7 +242,6 @@ func (in *IPAMHandleSpec) DeepCopyInto(out *IPAMHandleSpec) { (*out)[key] = val } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMHandleSpec. @@ -269,7 +261,6 @@ func (in *IPPool) DeepCopyInto(out *IPPool) { in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) in.Status.DeepCopyInto(&out.Status) - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPPool. @@ -302,7 +293,6 @@ func (in *IPPoolList) DeepCopyInto(out *IPPoolList) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPPoolList. @@ -333,7 +323,6 @@ func (in *IPPoolSpec) DeepCopyInto(out *IPPoolSpec) { copy(*out, *in) } in.DNS.DeepCopyInto(&out.DNS) - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPPoolSpec. @@ -356,7 +345,6 @@ func (in *IPPoolStatus) DeepCopyInto(out *IPPoolStatus) { (*out)[key] = val } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPPoolStatus. @@ -375,7 +363,6 @@ func (in *NamespaceNetworkPolicy) DeepCopyInto(out *NamespaceNetworkPolicy) { out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceNetworkPolicy. @@ -408,7 +395,6 @@ func (in *NamespaceNetworkPolicyList) DeepCopyInto(out *NamespaceNetworkPolicyLi (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceNetworkPolicyList. @@ -451,7 +437,6 @@ func (in *NamespaceNetworkPolicySpec) DeepCopyInto(out *NamespaceNetworkPolicySp *out = make([]v1.PolicyType, len(*in)) copy(*out, *in) } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceNetworkPolicySpec. @@ -467,7 +452,6 @@ func (in *NamespaceNetworkPolicySpec) DeepCopy() *NamespaceNetworkPolicySpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NamespaceSelector) DeepCopyInto(out *NamespaceSelector) { *out = *in - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceSelector. @@ -497,7 +481,6 @@ func (in *NetworkPolicyEgressRule) DeepCopyInto(out *NetworkPolicyEgressRule) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPolicyEgressRule. @@ -527,7 +510,6 @@ func (in *NetworkPolicyIngressRule) DeepCopyInto(out *NetworkPolicyIngressRule) (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPolicyIngressRule. @@ -558,7 +540,6 @@ func (in *NetworkPolicyPeer) DeepCopyInto(out *NetworkPolicyPeer) { *out = new(ServiceSelector) **out = **in } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPolicyPeer. @@ -574,7 +555,6 @@ func (in *NetworkPolicyPeer) DeepCopy() *NetworkPolicyPeer { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ReservedAttr) DeepCopyInto(out *ReservedAttr) { *out = *in - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReservedAttr. @@ -590,7 +570,6 @@ func (in *ReservedAttr) DeepCopy() *ReservedAttr { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Route) DeepCopyInto(out *Route) { *out = *in - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Route. @@ -606,7 +585,6 @@ func (in *Route) DeepCopy() *Route { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ServiceSelector) DeepCopyInto(out *ServiceSelector) { *out = *in - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceSelector. @@ -622,7 +600,6 @@ func (in *ServiceSelector) DeepCopy() *ServiceSelector { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *VLANConfig) DeepCopyInto(out *VLANConfig) { *out = *in - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VLANConfig. @@ -638,7 +615,6 @@ func (in *VLANConfig) DeepCopy() *VLANConfig { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *WorkspaceStatus) DeepCopyInto(out *WorkspaceStatus) { *out = *in - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceStatus. diff --git a/staging/src/kubesphere.io/api/notification/v2beta1/register.go b/staging/src/kubesphere.io/api/notification/v2beta1/register.go index 5b6250203..a768d455a 100644 --- a/staging/src/kubesphere.io/api/notification/v2beta1/register.go +++ b/staging/src/kubesphere.io/api/notification/v2beta1/register.go @@ -17,7 +17,7 @@ limitations under the License. // NOTE: Boilerplate only. Ignore this file. // Package v2beta1 contains API Schema definitions for the notification v2beta1 API group -// +k8s:deepcopy-gen=package,register +// +kubebuilder:object:generate=true // +groupName=notification.kubesphere.io package v2beta1 diff --git a/staging/src/kubesphere.io/api/notification/v2beta2/notificationmanager_types.go b/staging/src/kubesphere.io/api/notification/v2beta2/notificationmanager_types.go index a2317edcc..3e605edbd 100644 --- a/staging/src/kubesphere.io/api/notification/v2beta2/notificationmanager_types.go +++ b/staging/src/kubesphere.io/api/notification/v2beta2/notificationmanager_types.go @@ -315,7 +315,7 @@ type NotificationManagerStatus struct { // +genclient // +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +k8s:openapi-gen=true // NotificationManager is the Schema for the notificationmanagers API @@ -327,7 +327,7 @@ type NotificationManager struct { Status NotificationManagerStatus `json:"status,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +k8s:openapi-gen=true // NotificationManagerList contains a list of NotificationManager diff --git a/staging/src/kubesphere.io/api/notification/v2beta2/register.go b/staging/src/kubesphere.io/api/notification/v2beta2/register.go index 7bccd2e2b..0d1d238d7 100644 --- a/staging/src/kubesphere.io/api/notification/v2beta2/register.go +++ b/staging/src/kubesphere.io/api/notification/v2beta2/register.go @@ -15,7 +15,7 @@ limitations under the License. */ // Package v2beta2 contains API Schema definitions for the notification v1alpha1 API group -// +k8s:deepcopy-gen=package,register +// +kubebuilder:object:generate=true // +groupName=notification.kubesphere.io package v2beta2 diff --git a/staging/src/kubesphere.io/api/quota/v1alpha2/doc.go b/staging/src/kubesphere.io/api/quota/v1alpha2/doc.go index dfa2746ff..7fcc73a58 100644 --- a/staging/src/kubesphere.io/api/quota/v1alpha2/doc.go +++ b/staging/src/kubesphere.io/api/quota/v1alpha2/doc.go @@ -16,7 +16,7 @@ limitations under the License. // Package v1alpha2 contains API Schema definitions for the quotas v1alpha2 API group // +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package,register +// +kubebuilder:object:generate=true // +k8s:conversion-gen=kubesphere.io/api/quota // +k8s:defaulter-gen=TypeMeta // +groupName=quota.kubesphere.io diff --git a/staging/src/kubesphere.io/api/quota/v1alpha2/register.go b/staging/src/kubesphere.io/api/quota/v1alpha2/register.go index 40f1eeefa..12e2acd6a 100644 --- a/staging/src/kubesphere.io/api/quota/v1alpha2/register.go +++ b/staging/src/kubesphere.io/api/quota/v1alpha2/register.go @@ -18,7 +18,7 @@ limitations under the License. // Package v1alpha2 contains API Schema definitions for the quotas v1alpha2 API group // +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package,register +// +kubebuilder:object:generate=true // +k8s:conversion-gen=kubesphere.io/api/quota // +k8s:defaulter-gen=TypeMeta // +groupName=quota.kubesphere.io diff --git a/staging/src/kubesphere.io/api/quota/v1alpha2/types.go b/staging/src/kubesphere.io/api/quota/v1alpha2/types.go index 57e65dfcf..a700ce880 100644 --- a/staging/src/kubesphere.io/api/quota/v1alpha2/types.go +++ b/staging/src/kubesphere.io/api/quota/v1alpha2/types.go @@ -33,12 +33,12 @@ func init() { // +genclient // +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +k8s:openapi-gen=true // +kubebuilder:object:root=true // +kubebuilder:resource:categories="quota",scope="Cluster",path=resourcequotas // +kubebuilder:subresource:status -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // WorkspaceResourceQuota sets aggregate quota restrictions enforced per workspace type ResourceQuota struct { metav1.TypeMeta `json:",inline"` @@ -83,7 +83,7 @@ type ResourceQuotaStatusByNamespace struct { } // +kubebuilder:object:root=true -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // ResourceQuotaList is a list of WorkspaceResourceQuota items. type ResourceQuotaList struct { metav1.TypeMeta `json:",inline"` diff --git a/staging/src/kubesphere.io/api/quota/v1alpha2/zz_generated.deepcopy.go b/staging/src/kubesphere.io/api/quota/v1alpha2/zz_generated.deepcopy.go index 8ea725ac6..948ec95a3 100644 --- a/staging/src/kubesphere.io/api/quota/v1alpha2/zz_generated.deepcopy.go +++ b/staging/src/kubesphere.io/api/quota/v1alpha2/zz_generated.deepcopy.go @@ -17,7 +17,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by deepcopy-gen. DO NOT EDIT. +// Code generated by controller-gen. DO NOT EDIT. package v1alpha2 @@ -32,7 +32,6 @@ func (in *ResourceQuota) DeepCopyInto(out *ResourceQuota) { in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) in.Status.DeepCopyInto(&out.Status) - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceQuota. @@ -65,7 +64,6 @@ func (in *ResourceQuotaList) DeepCopyInto(out *ResourceQuotaList) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceQuotaList. @@ -97,7 +95,6 @@ func (in *ResourceQuotaSpec) DeepCopyInto(out *ResourceQuotaSpec) { } } in.Quota.DeepCopyInto(&out.Quota) - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceQuotaSpec. @@ -121,7 +118,6 @@ func (in *ResourceQuotaStatus) DeepCopyInto(out *ResourceQuotaStatus) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceQuotaStatus. @@ -138,7 +134,6 @@ func (in *ResourceQuotaStatus) DeepCopy() *ResourceQuotaStatus { func (in *ResourceQuotaStatusByNamespace) DeepCopyInto(out *ResourceQuotaStatusByNamespace) { *out = *in in.ResourceQuotaStatus.DeepCopyInto(&out.ResourceQuotaStatus) - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceQuotaStatusByNamespace. @@ -159,7 +154,6 @@ func (in ResourceQuotasStatusByNamespace) DeepCopyInto(out *ResourceQuotasStatus for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } - return } } diff --git a/staging/src/kubesphere.io/api/servicemesh/v1alpha2/doc.go b/staging/src/kubesphere.io/api/servicemesh/v1alpha2/doc.go index eb15debe8..e26d5abcd 100644 --- a/staging/src/kubesphere.io/api/servicemesh/v1alpha2/doc.go +++ b/staging/src/kubesphere.io/api/servicemesh/v1alpha2/doc.go @@ -16,7 +16,7 @@ limitations under the License. // Package v1alpha2 contains API Schema definitions for the servicemesh v1alpha2 API group // +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package,register +// +kubebuilder:object:generate=true // +k8s:conversion-gen=kubesphere.io/api/servicemesh // +k8s:defaulter-gen=TypeMeta // +groupName=servicemesh.kubesphere.io diff --git a/staging/src/kubesphere.io/api/servicemesh/v1alpha2/register.go b/staging/src/kubesphere.io/api/servicemesh/v1alpha2/register.go index dd13fcc43..a1e6f3f3d 100644 --- a/staging/src/kubesphere.io/api/servicemesh/v1alpha2/register.go +++ b/staging/src/kubesphere.io/api/servicemesh/v1alpha2/register.go @@ -18,7 +18,7 @@ limitations under the License. // Package v1alpha2 contains API Schema definitions for the servicemesh v1alpha2 API group // +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package,register +// +kubebuilder:object:generate=true // +k8s:conversion-gen=kubesphere.io/api/servicemesh // +k8s:defaulter-gen=TypeMeta // +groupName=servicemesh.kubesphere.io diff --git a/staging/src/kubesphere.io/api/servicemesh/v1alpha2/servicepolicy_types.go b/staging/src/kubesphere.io/api/servicemesh/v1alpha2/servicepolicy_types.go index 26c018ea5..afe151fdd 100644 --- a/staging/src/kubesphere.io/api/servicemesh/v1alpha2/servicepolicy_types.go +++ b/staging/src/kubesphere.io/api/servicemesh/v1alpha2/servicepolicy_types.go @@ -107,7 +107,7 @@ type ServicePolicyStatus struct { } // +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // ServicePolicy is the Schema for the servicepolicies API // +k8s:openapi-gen=true @@ -119,7 +119,7 @@ type ServicePolicy struct { Status ServicePolicyStatus `json:"status,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // ServicePolicyList contains a list of ServicePolicy type ServicePolicyList struct { diff --git a/staging/src/kubesphere.io/api/servicemesh/v1alpha2/strategy_types.go b/staging/src/kubesphere.io/api/servicemesh/v1alpha2/strategy_types.go index bf5bd227e..d42e30da1 100644 --- a/staging/src/kubesphere.io/api/servicemesh/v1alpha2/strategy_types.go +++ b/staging/src/kubesphere.io/api/servicemesh/v1alpha2/strategy_types.go @@ -152,7 +152,7 @@ type StrategyCondition struct { } // +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // Strategy is the Schema for the strategies API // +kubebuilder:printcolumn:name="Type",type="string",JSONPath=".spec.type",description="type of strategy" @@ -167,7 +167,7 @@ type Strategy struct { Status StrategyStatus `json:"status,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // StrategyList contains a list of Strategy type StrategyList struct { diff --git a/staging/src/kubesphere.io/api/storage/v1alpha1/capability_types.go b/staging/src/kubesphere.io/api/storage/v1alpha1/capability_types.go index 46dc0d746..4880c178e 100644 --- a/staging/src/kubesphere.io/api/storage/v1alpha1/capability_types.go +++ b/staging/src/kubesphere.io/api/storage/v1alpha1/capability_types.go @@ -58,7 +58,7 @@ type PluginInfo struct { } // +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +genclient:noStatus // +genclient:nonNamespaced // +kubebuilder:printcolumn:name="Provisioner",type="string",JSONPath=".spec.provisioner" @@ -84,7 +84,7 @@ type StorageClassCapabilitySpec struct { Features CapabilityFeatures `json:"features"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +genclient:nonNamespaced // StorageClassCapabilityList contains a list of StorageClassCapability @@ -95,7 +95,7 @@ type StorageClassCapabilityList struct { } // +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +genclient:noStatus // +genclient:nonNamespaced // +kubebuilder:printcolumn:name="Provisioner",type="string",JSONPath=".spec.pluginInfo.name" @@ -118,7 +118,7 @@ type ProvisionerCapabilitySpec struct { Features CapabilityFeatures `json:"features"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true type ProvisionerCapabilityList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` diff --git a/staging/src/kubesphere.io/api/storage/v1alpha1/doc.go b/staging/src/kubesphere.io/api/storage/v1alpha1/doc.go index 390950246..8b1610c28 100644 --- a/staging/src/kubesphere.io/api/storage/v1alpha1/doc.go +++ b/staging/src/kubesphere.io/api/storage/v1alpha1/doc.go @@ -16,7 +16,7 @@ limitations under the License. // Package v1alpha1 contains API Schema definitions for the storage v1alpha1 API group // +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package,register +// +kubebuilder:object:generate=true // +k8s:conversion-gen=kubesphere.io/api/storage // +k8s:defaulter-gen=TypeMeta // +groupName=storage.kubesphere.io diff --git a/staging/src/kubesphere.io/api/storage/v1alpha1/register.go b/staging/src/kubesphere.io/api/storage/v1alpha1/register.go index 5163db178..07d5795f5 100644 --- a/staging/src/kubesphere.io/api/storage/v1alpha1/register.go +++ b/staging/src/kubesphere.io/api/storage/v1alpha1/register.go @@ -18,7 +18,7 @@ limitations under the License. // Package v1alpha1 contains API Schema definitions for the storage v1alpha1 API group // +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package,register +// +kubebuilder:object:generate=true // +k8s:conversion-gen=kubesphere.io/api/storage // +k8s:defaulter-gen=TypeMeta // +groupName=storage.kubesphere.io diff --git a/staging/src/kubesphere.io/api/storage/v1alpha1/zz_generated.deepcopy.go b/staging/src/kubesphere.io/api/storage/v1alpha1/zz_generated.deepcopy.go index af169b55d..3824d43ab 100644 --- a/staging/src/kubesphere.io/api/storage/v1alpha1/zz_generated.deepcopy.go +++ b/staging/src/kubesphere.io/api/storage/v1alpha1/zz_generated.deepcopy.go @@ -17,7 +17,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by deepcopy-gen. DO NOT EDIT. +// Code generated by controller-gen. DO NOT EDIT. package v1alpha1 @@ -30,7 +30,6 @@ func (in *CapabilityFeatures) DeepCopyInto(out *CapabilityFeatures) { *out = *in out.Volume = in.Volume out.Snapshot = in.Snapshot - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CapabilityFeatures. @@ -46,7 +45,6 @@ func (in *CapabilityFeatures) DeepCopy() *CapabilityFeatures { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PluginInfo) DeepCopyInto(out *PluginInfo) { *out = *in - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PluginInfo. @@ -65,7 +63,6 @@ func (in *ProvisionerCapability) DeepCopyInto(out *ProvisionerCapability) { out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) out.Spec = in.Spec - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProvisionerCapability. @@ -98,7 +95,6 @@ func (in *ProvisionerCapabilityList) DeepCopyInto(out *ProvisionerCapabilityList (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProvisionerCapabilityList. @@ -124,7 +120,6 @@ func (in *ProvisionerCapabilitySpec) DeepCopyInto(out *ProvisionerCapabilitySpec *out = *in out.PluginInfo = in.PluginInfo out.Features = in.Features - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProvisionerCapabilitySpec. @@ -140,7 +135,6 @@ func (in *ProvisionerCapabilitySpec) DeepCopy() *ProvisionerCapabilitySpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SnapshotFeature) DeepCopyInto(out *SnapshotFeature) { *out = *in - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotFeature. @@ -159,7 +153,6 @@ func (in *StorageClassCapability) DeepCopyInto(out *StorageClassCapability) { out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) out.Spec = in.Spec - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageClassCapability. @@ -192,7 +185,6 @@ func (in *StorageClassCapabilityList) DeepCopyInto(out *StorageClassCapabilityLi (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageClassCapabilityList. @@ -217,7 +209,6 @@ func (in *StorageClassCapabilityList) DeepCopyObject() runtime.Object { func (in *StorageClassCapabilitySpec) DeepCopyInto(out *StorageClassCapabilitySpec) { *out = *in out.Features = in.Features - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageClassCapabilitySpec. @@ -233,7 +224,6 @@ func (in *StorageClassCapabilitySpec) DeepCopy() *StorageClassCapabilitySpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *VolumeFeature) DeepCopyInto(out *VolumeFeature) { *out = *in - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeFeature. diff --git a/staging/src/kubesphere.io/api/tenant/v1alpha1/doc.go b/staging/src/kubesphere.io/api/tenant/v1alpha1/doc.go index 64859094e..000f5d47e 100644 --- a/staging/src/kubesphere.io/api/tenant/v1alpha1/doc.go +++ b/staging/src/kubesphere.io/api/tenant/v1alpha1/doc.go @@ -16,7 +16,7 @@ limitations under the License. // Package v1alpha1 contains API Schema definitions for the tenant v1alpha1 API group // +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package,register +// +kubebuilder:object:generate=true // +k8s:conversion-gen=kubesphere.io/api/tenant // +k8s:defaulter-gen=TypeMeta // +groupName=tenant.kubesphere.io diff --git a/staging/src/kubesphere.io/api/tenant/v1alpha1/register.go b/staging/src/kubesphere.io/api/tenant/v1alpha1/register.go index 21136f842..e73c4cdc0 100644 --- a/staging/src/kubesphere.io/api/tenant/v1alpha1/register.go +++ b/staging/src/kubesphere.io/api/tenant/v1alpha1/register.go @@ -18,7 +18,7 @@ limitations under the License. // Package v1alpha1 contains API Schema definitions for the tenant v1alpha1 API group // +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package,register +// +kubebuilder:object:generate=true // +k8s:conversion-gen=kubesphere.io/api/tenant // +k8s:defaulter-gen=TypeMeta // +groupName=tenant.kubesphere.io diff --git a/staging/src/kubesphere.io/api/tenant/v1alpha1/workspace_types.go b/staging/src/kubesphere.io/api/tenant/v1alpha1/workspace_types.go index dfb9af43c..1a1124f8b 100644 --- a/staging/src/kubesphere.io/api/tenant/v1alpha1/workspace_types.go +++ b/staging/src/kubesphere.io/api/tenant/v1alpha1/workspace_types.go @@ -43,7 +43,7 @@ type WorkspaceStatus struct { } // +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +genclient:nonNamespaced // Workspace is the Schema for the workspaces API @@ -56,7 +56,7 @@ type Workspace struct { Status WorkspaceStatus `json:"status,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +genclient:nonNamespaced // WorkspaceList contains a list of Workspace diff --git a/staging/src/kubesphere.io/api/tenant/v1alpha1/zz_generated.deepcopy.go b/staging/src/kubesphere.io/api/tenant/v1alpha1/zz_generated.deepcopy.go index e0afcbe3f..b55103c98 100644 --- a/staging/src/kubesphere.io/api/tenant/v1alpha1/zz_generated.deepcopy.go +++ b/staging/src/kubesphere.io/api/tenant/v1alpha1/zz_generated.deepcopy.go @@ -17,7 +17,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by deepcopy-gen. DO NOT EDIT. +// Code generated by controller-gen. DO NOT EDIT. package v1alpha1 @@ -32,7 +32,6 @@ func (in *Workspace) DeepCopyInto(out *Workspace) { in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) out.Status = in.Status - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Workspace. @@ -65,7 +64,6 @@ func (in *WorkspaceList) DeepCopyInto(out *WorkspaceList) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceList. @@ -94,7 +92,6 @@ func (in *WorkspaceSpec) DeepCopyInto(out *WorkspaceSpec) { *out = new(bool) **out = **in } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceSpec. @@ -110,7 +107,6 @@ func (in *WorkspaceSpec) DeepCopy() *WorkspaceSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *WorkspaceStatus) DeepCopyInto(out *WorkspaceStatus) { *out = *in - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceStatus. diff --git a/staging/src/kubesphere.io/api/tenant/v1alpha2/doc.go b/staging/src/kubesphere.io/api/tenant/v1alpha2/doc.go index 9720e480f..19754cd10 100644 --- a/staging/src/kubesphere.io/api/tenant/v1alpha2/doc.go +++ b/staging/src/kubesphere.io/api/tenant/v1alpha2/doc.go @@ -16,7 +16,7 @@ limitations under the License. // Package v1alpha2 contains API Schema definitions for the tenant v1alpha2 API group // +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package,register +// +kubebuilder:object:generate=true // +k8s:conversion-gen=kubesphere.io/api/tenant // +k8s:defaulter-gen=TypeMeta // +groupName=tenant.kubesphere.io diff --git a/staging/src/kubesphere.io/api/tenant/v1alpha2/register.go b/staging/src/kubesphere.io/api/tenant/v1alpha2/register.go index a091f8197..4cc2e1471 100644 --- a/staging/src/kubesphere.io/api/tenant/v1alpha2/register.go +++ b/staging/src/kubesphere.io/api/tenant/v1alpha2/register.go @@ -18,7 +18,7 @@ limitations under the License. // Package v1alpha2 contains API Schema definitions for the tenant v1alpha2 API group // +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package,register +// +kubebuilder:object:generate=true // +k8s:conversion-gen=kubesphere.io/api/tenant // +k8s:defaulter-gen=TypeMeta // +groupName=tenant.kubesphere.io diff --git a/staging/src/kubesphere.io/api/tenant/v1alpha2/workspacetemplate_types.go b/staging/src/kubesphere.io/api/tenant/v1alpha2/workspacetemplate_types.go index c7431afe2..caee9fa48 100644 --- a/staging/src/kubesphere.io/api/tenant/v1alpha2/workspacetemplate_types.go +++ b/staging/src/kubesphere.io/api/tenant/v1alpha2/workspacetemplate_types.go @@ -29,7 +29,7 @@ const ( ) // +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +genclient:nonNamespaced // WorkspaceTemplate is the Schema for the workspacetemplates API @@ -41,7 +41,7 @@ type WorkspaceTemplate struct { Spec typesv1alpha1.FederatedWorkspaceSpec `json:"spec,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +genclient:nonNamespaced // WorkspaceTemplateList contains a list of WorkspaceTemplate diff --git a/staging/src/kubesphere.io/api/tenant/v1alpha2/zz_generated.deepcopy.go b/staging/src/kubesphere.io/api/tenant/v1alpha2/zz_generated.deepcopy.go index 7ca8cc9f7..13bc6f0eb 100644 --- a/staging/src/kubesphere.io/api/tenant/v1alpha2/zz_generated.deepcopy.go +++ b/staging/src/kubesphere.io/api/tenant/v1alpha2/zz_generated.deepcopy.go @@ -17,7 +17,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by deepcopy-gen. DO NOT EDIT. +// Code generated by controller-gen. DO NOT EDIT. package v1alpha2 @@ -31,7 +31,6 @@ func (in *WorkspaceTemplate) DeepCopyInto(out *WorkspaceTemplate) { out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceTemplate. @@ -64,7 +63,6 @@ func (in *WorkspaceTemplateList) DeepCopyInto(out *WorkspaceTemplateList) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceTemplateList. diff --git a/staging/src/kubesphere.io/api/types/v1beta1/doc.go b/staging/src/kubesphere.io/api/types/v1beta1/doc.go index 08bec60ea..c0221a965 100644 --- a/staging/src/kubesphere.io/api/types/v1beta1/doc.go +++ b/staging/src/kubesphere.io/api/types/v1beta1/doc.go @@ -15,7 +15,7 @@ limitations under the License. */ // +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package,register +// +kubebuilder:object:generate=true // +k8s:conversion-gen=kubesphere.io/api/types // +k8s:defaulter-gen=TypeMeta // +groupName=types.kubefed.io diff --git a/staging/src/kubesphere.io/api/types/v1beta1/federatedapplication_types.go b/staging/src/kubesphere.io/api/types/v1beta1/federatedapplication_types.go index 9bf1d7c84..0b3b77ba6 100644 --- a/staging/src/kubesphere.io/api/types/v1beta1/federatedapplication_types.go +++ b/staging/src/kubesphere.io/api/types/v1beta1/federatedapplication_types.go @@ -28,7 +28,7 @@ const ( ) // +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +k8s:openapi-gen=true type FederatedApplication struct { metav1.TypeMeta `json:",inline"` @@ -48,7 +48,7 @@ type ApplicationTemplate struct { Spec v1beta1.ApplicationSpec `json:"spec,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // FederatedApplicationList contains a list of federatedapplicationlists type FederatedApplicationList struct { diff --git a/staging/src/kubesphere.io/api/types/v1beta1/federatedclusterrole_types.go b/staging/src/kubesphere.io/api/types/v1beta1/federatedclusterrole_types.go index 48fc9c5f8..36a45ac75 100644 --- a/staging/src/kubesphere.io/api/types/v1beta1/federatedclusterrole_types.go +++ b/staging/src/kubesphere.io/api/types/v1beta1/federatedclusterrole_types.go @@ -28,7 +28,7 @@ const ( ) // +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +k8s:openapi-gen=true type FederatedClusterRole struct { metav1.TypeMeta `json:",inline"` @@ -52,7 +52,7 @@ type ClusterRoleTemplate struct { AggregationRule *v1.AggregationRule `json:"aggregationRule,omitempty" protobuf:"bytes,3,opt,name=aggregationRule"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // FederatedClusterRoleList contains a list of federatedclusterrolelists type FederatedClusterRoleList struct { diff --git a/staging/src/kubesphere.io/api/types/v1beta1/federatedclusterrolebinding_types.go b/staging/src/kubesphere.io/api/types/v1beta1/federatedclusterrolebinding_types.go index 3405cf77e..10cbd43bc 100644 --- a/staging/src/kubesphere.io/api/types/v1beta1/federatedclusterrolebinding_types.go +++ b/staging/src/kubesphere.io/api/types/v1beta1/federatedclusterrolebinding_types.go @@ -28,7 +28,7 @@ const ( ) // +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +k8s:openapi-gen=true type FederatedClusterRoleBinding struct { metav1.TypeMeta `json:",inline"` @@ -53,7 +53,7 @@ type ClusterRoleBindingTemplate struct { RoleRef v1.RoleRef `json:"roleRef" protobuf:"bytes,3,opt,name=roleRef"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // FederatedClusterRoleBindingList contains a list of federatedclusterrolebindinglists type FederatedClusterRoleBindingList struct { diff --git a/staging/src/kubesphere.io/api/types/v1beta1/federatedconfigmap_types.go b/staging/src/kubesphere.io/api/types/v1beta1/federatedconfigmap_types.go index 820b6d4cb..dd4d5ed6a 100644 --- a/staging/src/kubesphere.io/api/types/v1beta1/federatedconfigmap_types.go +++ b/staging/src/kubesphere.io/api/types/v1beta1/federatedconfigmap_types.go @@ -27,7 +27,7 @@ const ( ) // +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +k8s:openapi-gen=true type FederatedConfigMap struct { metav1.TypeMeta `json:",inline"` @@ -52,7 +52,7 @@ type ConfigMapTemplate struct { BinaryData map[string][]byte `json:"binaryData,omitempty" protobuf:"bytes,3,rep,name=binaryData"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // FederatedConfigmapList contains a list of federatedconfigmaplists type FederatedConfigMapList struct { diff --git a/staging/src/kubesphere.io/api/types/v1beta1/federateddeployment_types.go b/staging/src/kubesphere.io/api/types/v1beta1/federateddeployment_types.go index e53d669ec..9b17217aa 100644 --- a/staging/src/kubesphere.io/api/types/v1beta1/federateddeployment_types.go +++ b/staging/src/kubesphere.io/api/types/v1beta1/federateddeployment_types.go @@ -28,7 +28,7 @@ const ( ) // +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +k8s:openapi-gen=true type FederatedDeployment struct { metav1.TypeMeta `json:",inline"` @@ -48,7 +48,7 @@ type DeploymentTemplate struct { Spec appsv1.DeploymentSpec `json:"spec,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // FederatedDeploymentList contains a list of federateddeploymentlists type FederatedDeploymentList struct { diff --git a/staging/src/kubesphere.io/api/types/v1beta1/federatedgroup_types.go b/staging/src/kubesphere.io/api/types/v1beta1/federatedgroup_types.go index 29ccb66ec..67eb165b6 100644 --- a/staging/src/kubesphere.io/api/types/v1beta1/federatedgroup_types.go +++ b/staging/src/kubesphere.io/api/types/v1beta1/federatedgroup_types.go @@ -30,7 +30,7 @@ const ( // +genclient // +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +k8s:openapi-gen=true type FederatedGroup struct { metav1.TypeMeta `json:",inline"` @@ -51,7 +51,7 @@ type GroupTemplate struct { Spec v1alpha2.GroupSpec `json:"spec,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // FederatedGroupList contains a list of federateduserlists type FederatedGroupList struct { diff --git a/staging/src/kubesphere.io/api/types/v1beta1/federatedgroupbinding_types.go b/staging/src/kubesphere.io/api/types/v1beta1/federatedgroupbinding_types.go index d6fbfedc8..d20a5dc6e 100644 --- a/staging/src/kubesphere.io/api/types/v1beta1/federatedgroupbinding_types.go +++ b/staging/src/kubesphere.io/api/types/v1beta1/federatedgroupbinding_types.go @@ -30,7 +30,7 @@ const ( // +genclient // +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +k8s:openapi-gen=true type FederatedGroupBinding struct { metav1.TypeMeta `json:",inline"` @@ -54,7 +54,7 @@ type GroupBindingTemplate struct { Users []string `json:"users,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // FederatedGroupBindingList contains a list of federateduserlists type FederatedGroupBindingList struct { diff --git a/staging/src/kubesphere.io/api/types/v1beta1/federatedingress_types.go b/staging/src/kubesphere.io/api/types/v1beta1/federatedingress_types.go index 83415cea6..5651a6b62 100644 --- a/staging/src/kubesphere.io/api/types/v1beta1/federatedingress_types.go +++ b/staging/src/kubesphere.io/api/types/v1beta1/federatedingress_types.go @@ -28,7 +28,7 @@ const ( ) // +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +k8s:openapi-gen=true type FederatedIngress struct { metav1.TypeMeta `json:",inline"` @@ -48,7 +48,7 @@ type IngressTemplate struct { Spec networkingv1.IngressSpec `json:"spec,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // FederatedIngressList contains a list of federatedingresslists type FederatedIngressList struct { diff --git a/staging/src/kubesphere.io/api/types/v1beta1/federatedjob_types.go b/staging/src/kubesphere.io/api/types/v1beta1/federatedjob_types.go index 66a9bf63a..97501605d 100644 --- a/staging/src/kubesphere.io/api/types/v1beta1/federatedjob_types.go +++ b/staging/src/kubesphere.io/api/types/v1beta1/federatedjob_types.go @@ -28,7 +28,7 @@ const ( ) // +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +k8s:openapi-gen=true type FederatedJob struct { metav1.TypeMeta `json:",inline"` @@ -48,7 +48,7 @@ type JobTemplate struct { Spec v1.JobSpec `json:"spec,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // FederatedJobList contains a list of federatedjoblists type FederatedJobList struct { diff --git a/staging/src/kubesphere.io/api/types/v1beta1/federatedlimitrange_types.go b/staging/src/kubesphere.io/api/types/v1beta1/federatedlimitrange_types.go index 48df32ebf..a6f218e6b 100644 --- a/staging/src/kubesphere.io/api/types/v1beta1/federatedlimitrange_types.go +++ b/staging/src/kubesphere.io/api/types/v1beta1/federatedlimitrange_types.go @@ -28,7 +28,7 @@ const ( ) // +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +k8s:openapi-gen=true type FederatedLimitRange struct { metav1.TypeMeta `json:",inline"` @@ -48,7 +48,7 @@ type LimitRangeTemplate struct { Spec corev1.LimitRangeSpec `json:"spec,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // FederatedLimitRangeList contains a list of federatedlimitrangelists type FederatedLimitRangeList struct { diff --git a/staging/src/kubesphere.io/api/types/v1beta1/federatednamespace_types.go b/staging/src/kubesphere.io/api/types/v1beta1/federatednamespace_types.go index 3926b808e..10ed3232e 100644 --- a/staging/src/kubesphere.io/api/types/v1beta1/federatednamespace_types.go +++ b/staging/src/kubesphere.io/api/types/v1beta1/federatednamespace_types.go @@ -28,7 +28,7 @@ const ( ) // +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +k8s:openapi-gen=true type FederatedNamespace struct { metav1.TypeMeta `json:",inline"` @@ -48,7 +48,7 @@ type NamespaceTemplate struct { Spec corev1.NamespaceSpec `json:"spec,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // FederatedNamespaceList contains a list of federatednamespacelists type FederatedNamespaceList struct { diff --git a/staging/src/kubesphere.io/api/types/v1beta1/federatednotificationconfig_types.go b/staging/src/kubesphere.io/api/types/v1beta1/federatednotificationconfig_types.go index 6efeb9fc4..4bb5d0560 100644 --- a/staging/src/kubesphere.io/api/types/v1beta1/federatednotificationconfig_types.go +++ b/staging/src/kubesphere.io/api/types/v1beta1/federatednotificationconfig_types.go @@ -29,8 +29,7 @@ const ( ) // +genclient:nonNamespaced -// +k8s:deepcopy-gen=true -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +k8s:openapi-gen=true // +kubebuilder:resource:scope=Cluster // +kubebuilder:subresource:status @@ -54,7 +53,7 @@ type NotificationConfigTemplate struct { Spec v2beta1.ConfigSpec `json:"spec,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // FederatedNotificationConfigList contains a list of federatednotificationconfiglists type FederatedNotificationConfigList struct { diff --git a/staging/src/kubesphere.io/api/types/v1beta1/federatednotificationreceiver_types.go b/staging/src/kubesphere.io/api/types/v1beta1/federatednotificationreceiver_types.go index 8cab56ec4..eb01db672 100644 --- a/staging/src/kubesphere.io/api/types/v1beta1/federatednotificationreceiver_types.go +++ b/staging/src/kubesphere.io/api/types/v1beta1/federatednotificationreceiver_types.go @@ -29,7 +29,7 @@ const ( ) // +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +k8s:openapi-gen=true // +kubebuilder:resource:scope=Cluster // +kubebuilder:subresource:status @@ -53,7 +53,7 @@ type NotificationReceiverTemplate struct { Spec v2beta1.ReceiverSpec `json:"spec,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // FederatedNotificationConfigList contains a list of federatednotificationreceiverlists type FederatedNotificationReceiverList struct { diff --git a/staging/src/kubesphere.io/api/types/v1beta1/federatedpersistentvolumeclaim_types.go b/staging/src/kubesphere.io/api/types/v1beta1/federatedpersistentvolumeclaim_types.go index c1c712061..bbc6677ac 100644 --- a/staging/src/kubesphere.io/api/types/v1beta1/federatedpersistentvolumeclaim_types.go +++ b/staging/src/kubesphere.io/api/types/v1beta1/federatedpersistentvolumeclaim_types.go @@ -28,7 +28,7 @@ const ( ) // +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +k8s:openapi-gen=true type FederatedPersistentVolumeClaim struct { metav1.TypeMeta `json:",inline"` @@ -50,7 +50,7 @@ type PersistentVolumeClaimTemplate struct { Spec corev1.PersistentVolumeClaimSpec `json:"spec,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // FederatedPersistentVolumeClaimList contains a list of federatedpersistentvolumeclaimlists type FederatedPersistentVolumeClaimList struct { diff --git a/staging/src/kubesphere.io/api/types/v1beta1/federatedsecret_types.go b/staging/src/kubesphere.io/api/types/v1beta1/federatedsecret_types.go index 119ae9fad..07c49951c 100644 --- a/staging/src/kubesphere.io/api/types/v1beta1/federatedsecret_types.go +++ b/staging/src/kubesphere.io/api/types/v1beta1/federatedsecret_types.go @@ -28,7 +28,7 @@ const ( ) // +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +k8s:openapi-gen=true type FederatedSecret struct { metav1.TypeMeta `json:",inline"` @@ -56,7 +56,7 @@ type SecretTemplate struct { Type corev1.SecretType `json:"type,omitempty" protobuf:"bytes,3,opt,name=type,casttype=SecretType"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // FederatedConfigmapList contains a list of federatedsecretlists type FederatedSecretList struct { diff --git a/staging/src/kubesphere.io/api/types/v1beta1/federatedservice_types.go b/staging/src/kubesphere.io/api/types/v1beta1/federatedservice_types.go index 9629ea55b..187d65a1b 100644 --- a/staging/src/kubesphere.io/api/types/v1beta1/federatedservice_types.go +++ b/staging/src/kubesphere.io/api/types/v1beta1/federatedservice_types.go @@ -28,7 +28,7 @@ const ( ) // +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +k8s:openapi-gen=true type FederatedService struct { metav1.TypeMeta `json:",inline"` @@ -50,7 +50,7 @@ type ServiceTemplate struct { Spec corev1.ServiceSpec `json:"spec,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // FederatedServiceList contains a list of federatedservicelists type FederatedServiceList struct { diff --git a/staging/src/kubesphere.io/api/types/v1beta1/federatedstatefulset_types.go b/staging/src/kubesphere.io/api/types/v1beta1/federatedstatefulset_types.go index 1bace4b2f..94d5db1ed 100644 --- a/staging/src/kubesphere.io/api/types/v1beta1/federatedstatefulset_types.go +++ b/staging/src/kubesphere.io/api/types/v1beta1/federatedstatefulset_types.go @@ -28,7 +28,7 @@ const ( ) // +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +k8s:openapi-gen=true type FederatedStatefulSet struct { metav1.TypeMeta `json:",inline"` @@ -50,7 +50,7 @@ type StatefulSetTemplate struct { Spec appsv1.StatefulSetSpec `json:"spec,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // FederatedStatefulSetList contains a list of federatedstatefulsetlists type FederatedStatefulSetList struct { diff --git a/staging/src/kubesphere.io/api/types/v1beta1/federateduser_types.go b/staging/src/kubesphere.io/api/types/v1beta1/federateduser_types.go index 4e51062eb..688ba7855 100644 --- a/staging/src/kubesphere.io/api/types/v1beta1/federateduser_types.go +++ b/staging/src/kubesphere.io/api/types/v1beta1/federateduser_types.go @@ -28,7 +28,7 @@ const ( FederatedUserKind = "FederatedUser" ) -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +k8s:openapi-gen=true type FederatedUser struct { metav1.TypeMeta `json:",inline"` @@ -51,7 +51,7 @@ type UserTemplate struct { Status v1alpha2.UserStatus `json:"status,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // FederatedUserList contains a list of FederatedUser type FederatedUserList struct { diff --git a/staging/src/kubesphere.io/api/types/v1beta1/federatedworkspace_types.go b/staging/src/kubesphere.io/api/types/v1beta1/federatedworkspace_types.go index e885eaa17..71abd015a 100644 --- a/staging/src/kubesphere.io/api/types/v1beta1/federatedworkspace_types.go +++ b/staging/src/kubesphere.io/api/types/v1beta1/federatedworkspace_types.go @@ -28,7 +28,7 @@ const ( FederatedWorkspaceKind = "FederatedWorkspace" ) -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +k8s:openapi-gen=true type FederatedWorkspace struct { metav1.TypeMeta `json:",inline"` @@ -49,7 +49,7 @@ type WorkspaceTemplate struct { Spec workspacev1alpha1.WorkspaceSpec `json:"spec,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // FederatedWorkspaceList contains a list of FederatedWorkspace type FederatedWorkspaceList struct { diff --git a/staging/src/kubesphere.io/api/types/v1beta1/federatedworkspacerole_types.go b/staging/src/kubesphere.io/api/types/v1beta1/federatedworkspacerole_types.go index ffd4a9098..fb87d4b07 100644 --- a/staging/src/kubesphere.io/api/types/v1beta1/federatedworkspacerole_types.go +++ b/staging/src/kubesphere.io/api/types/v1beta1/federatedworkspacerole_types.go @@ -27,7 +27,7 @@ const ( FederatedWorkspaceRoleKind = "FederatedWorkspaceRole" ) -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +k8s:openapi-gen=true type FederatedWorkspaceRole struct { metav1.TypeMeta `json:",inline"` @@ -50,7 +50,7 @@ type WorkspaceRoleTemplate struct { Rules []rbacv1.PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // FederatedWorkspaceRoleList contains a list of FederatedWorkspaceRole type FederatedWorkspaceRoleList struct { diff --git a/staging/src/kubesphere.io/api/types/v1beta1/federatedworkspacerolebinding_types.go b/staging/src/kubesphere.io/api/types/v1beta1/federatedworkspacerolebinding_types.go index 5c1f65abd..4dbdfdb3e 100644 --- a/staging/src/kubesphere.io/api/types/v1beta1/federatedworkspacerolebinding_types.go +++ b/staging/src/kubesphere.io/api/types/v1beta1/federatedworkspacerolebinding_types.go @@ -27,7 +27,7 @@ const ( FederatedWorkspaceRoleBindingKind = "FederatedWorkspaceRoleBinding" ) -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +k8s:openapi-gen=true type FederatedWorkspaceRoleBinding struct { metav1.TypeMeta `json:",inline"` @@ -54,7 +54,7 @@ type WorkspaceRoleBindingTemplate struct { RoleRef rbacv1.RoleRef `json:"roleRef" protobuf:"bytes,3,opt,name=roleRef"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // FederatedWorkspaceRoleBindingList contains a list of FederatedWorkspaceRoleBinding type FederatedWorkspaceRoleBindingList struct { diff --git a/staging/src/kubesphere.io/api/types/v1beta1/register.go b/staging/src/kubesphere.io/api/types/v1beta1/register.go index a464d14ee..fc5ce27af 100644 --- a/staging/src/kubesphere.io/api/types/v1beta1/register.go +++ b/staging/src/kubesphere.io/api/types/v1beta1/register.go @@ -17,7 +17,7 @@ limitations under the License. // NOTE: Boilerplate only. Ignore this file. // +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package,register +// +kubebuilder:object:generate=true // +kubebuilder:object:generate=true // +groupName=types.kubefed.io package v1beta1 diff --git a/staging/src/kubesphere.io/api/types/v1beta2/doc.go b/staging/src/kubesphere.io/api/types/v1beta2/doc.go index d2bba2abd..40419ad5b 100644 --- a/staging/src/kubesphere.io/api/types/v1beta2/doc.go +++ b/staging/src/kubesphere.io/api/types/v1beta2/doc.go @@ -15,7 +15,7 @@ limitations under the License. */ // +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package,register +// +kubebuilder:object:generate=true // +k8s:conversion-gen=kubesphere.io/api/types // +k8s:defaulter-gen=TypeMeta // +groupName=types.kubefed.io diff --git a/staging/src/kubesphere.io/api/types/v1beta2/federatednotificationconfig_types.go b/staging/src/kubesphere.io/api/types/v1beta2/federatednotificationconfig_types.go index 38812f7cf..b3fd5143a 100644 --- a/staging/src/kubesphere.io/api/types/v1beta2/federatednotificationconfig_types.go +++ b/staging/src/kubesphere.io/api/types/v1beta2/federatednotificationconfig_types.go @@ -32,7 +32,7 @@ const ( // +genclient // +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +k8s:openapi-gen=true // +kubebuilder:resource:scope=Cluster // +kubebuilder:subresource:status @@ -57,7 +57,7 @@ type NotificationConfigTemplate struct { Spec v2beta2.ConfigSpec `json:"spec,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +k8s:openapi-gen=true // FederatedNotificationConfigList contains a list of federatednotificationconfiglists diff --git a/staging/src/kubesphere.io/api/types/v1beta2/federatednotificationmanager_types.go b/staging/src/kubesphere.io/api/types/v1beta2/federatednotificationmanager_types.go index 56fea07bd..fec70d117 100644 --- a/staging/src/kubesphere.io/api/types/v1beta2/federatednotificationmanager_types.go +++ b/staging/src/kubesphere.io/api/types/v1beta2/federatednotificationmanager_types.go @@ -29,7 +29,7 @@ const ( // +genclient // +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +k8s:openapi-gen=true // +kubebuilder:resource:scope=Cluster // +kubebuilder:subresource:status @@ -54,7 +54,7 @@ type NotificationManagerTemplate struct { Spec v2beta2.NotificationManagerSpec `json:"spec,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +k8s:openapi-gen=true // FederatedNotificationManagerList contains a list of federatednotificationmanagerlists diff --git a/staging/src/kubesphere.io/api/types/v1beta2/federatednotificationreceiver_types.go b/staging/src/kubesphere.io/api/types/v1beta2/federatednotificationreceiver_types.go index d978846ee..f4a0da43a 100644 --- a/staging/src/kubesphere.io/api/types/v1beta2/federatednotificationreceiver_types.go +++ b/staging/src/kubesphere.io/api/types/v1beta2/federatednotificationreceiver_types.go @@ -32,7 +32,7 @@ const ( // +genclient // +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +k8s:openapi-gen=true // +kubebuilder:resource:scope=Cluster // +kubebuilder:subresource:status @@ -57,7 +57,7 @@ type NotificationReceiverTemplate struct { Spec v2beta2.ReceiverSpec `json:"spec,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +k8s:openapi-gen=true // FederatedNotificationReceiverList contains a list of federatednotificationreceiverlists diff --git a/staging/src/kubesphere.io/api/types/v1beta2/federatednotificationrouter_types.go b/staging/src/kubesphere.io/api/types/v1beta2/federatednotificationrouter_types.go index 9124658c5..34b81f0f6 100644 --- a/staging/src/kubesphere.io/api/types/v1beta2/federatednotificationrouter_types.go +++ b/staging/src/kubesphere.io/api/types/v1beta2/federatednotificationrouter_types.go @@ -29,7 +29,7 @@ const ( // +genclient // +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +k8s:openapi-gen=true // +kubebuilder:resource:scope=Cluster // +kubebuilder:subresource:status @@ -54,7 +54,7 @@ type NotificationRouterTemplate struct { Spec v2beta2.RouterSpec `json:"spec,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +k8s:openapi-gen=true // FederatedNotificationRouterList contains a list of federatednotificationrouterlists diff --git a/staging/src/kubesphere.io/api/types/v1beta2/federatednotificationsilence_types.go b/staging/src/kubesphere.io/api/types/v1beta2/federatednotificationsilence_types.go index 161b2d9f3..7a6cfda5e 100644 --- a/staging/src/kubesphere.io/api/types/v1beta2/federatednotificationsilence_types.go +++ b/staging/src/kubesphere.io/api/types/v1beta2/federatednotificationsilence_types.go @@ -29,7 +29,7 @@ const ( // +genclient // +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +k8s:openapi-gen=true // +kubebuilder:resource:scope=Cluster // +kubebuilder:subresource:status @@ -54,7 +54,7 @@ type NotificationSilenceTemplate struct { Spec v2beta2.SilenceSpec `json:"spec,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // +k8s:openapi-gen=true // FederatedNotificationSilenceList contains a list of federatednotificationsilencelists diff --git a/staging/src/kubesphere.io/api/types/v1beta2/register.go b/staging/src/kubesphere.io/api/types/v1beta2/register.go index 9546333a1..a74db9af8 100644 --- a/staging/src/kubesphere.io/api/types/v1beta2/register.go +++ b/staging/src/kubesphere.io/api/types/v1beta2/register.go @@ -17,7 +17,6 @@ limitations under the License. // NOTE: Boilerplate only. Ignore this file. // +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package,register // +kubebuilder:object:generate=true // +groupName=types.kubefed.io package v1beta2 diff --git a/staging/src/kubesphere.io/api/types/v1beta2/zz_generated.deepcopy.go b/staging/src/kubesphere.io/api/types/v1beta2/zz_generated.deepcopy.go index 36c653698..1902648e7 100644 --- a/staging/src/kubesphere.io/api/types/v1beta2/zz_generated.deepcopy.go +++ b/staging/src/kubesphere.io/api/types/v1beta2/zz_generated.deepcopy.go @@ -17,19 +17,20 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by controller-gen. DO NOT EDIT. +// Code generated by deepcopy-gen. DO NOT EDIT. package v1beta2 import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" + runtime "k8s.io/apimachinery/pkg/runtime" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ClusterOverride) DeepCopyInto(out *ClusterOverride) { *out = *in in.Value.DeepCopyInto(&out.Value) + return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterOverride. @@ -53,6 +54,7 @@ func (in *FederatedNotificationConfig) DeepCopyInto(out *FederatedNotificationCo *out = new(GenericFederatedStatus) (*in).DeepCopyInto(*out) } + return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederatedNotificationConfig. @@ -85,6 +87,7 @@ func (in *FederatedNotificationConfigList) DeepCopyInto(out *FederatedNotificati (*in)[i].DeepCopyInto(&(*out)[i]) } } + return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederatedNotificationConfigList. @@ -117,6 +120,7 @@ func (in *FederatedNotificationConfigSpec) DeepCopyInto(out *FederatedNotificati (*in)[i].DeepCopyInto(&(*out)[i]) } } + return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederatedNotificationConfigSpec. @@ -140,6 +144,7 @@ func (in *FederatedNotificationManager) DeepCopyInto(out *FederatedNotificationM *out = new(GenericFederatedStatus) (*in).DeepCopyInto(*out) } + return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederatedNotificationManager. @@ -172,6 +177,7 @@ func (in *FederatedNotificationManagerList) DeepCopyInto(out *FederatedNotificat (*in)[i].DeepCopyInto(&(*out)[i]) } } + return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederatedNotificationManagerList. @@ -204,6 +210,7 @@ func (in *FederatedNotificationManagerSpec) DeepCopyInto(out *FederatedNotificat (*in)[i].DeepCopyInto(&(*out)[i]) } } + return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederatedNotificationManagerSpec. @@ -227,6 +234,7 @@ func (in *FederatedNotificationReceiver) DeepCopyInto(out *FederatedNotification *out = new(GenericFederatedStatus) (*in).DeepCopyInto(*out) } + return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederatedNotificationReceiver. @@ -259,6 +267,7 @@ func (in *FederatedNotificationReceiverList) DeepCopyInto(out *FederatedNotifica (*in)[i].DeepCopyInto(&(*out)[i]) } } + return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederatedNotificationReceiverList. @@ -291,6 +300,7 @@ func (in *FederatedNotificationReceiverSpec) DeepCopyInto(out *FederatedNotifica (*in)[i].DeepCopyInto(&(*out)[i]) } } + return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederatedNotificationReceiverSpec. @@ -314,6 +324,7 @@ func (in *FederatedNotificationRouter) DeepCopyInto(out *FederatedNotificationRo *out = new(GenericFederatedStatus) (*in).DeepCopyInto(*out) } + return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederatedNotificationRouter. @@ -346,6 +357,7 @@ func (in *FederatedNotificationRouterList) DeepCopyInto(out *FederatedNotificati (*in)[i].DeepCopyInto(&(*out)[i]) } } + return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederatedNotificationRouterList. @@ -378,6 +390,7 @@ func (in *FederatedNotificationRouterSpec) DeepCopyInto(out *FederatedNotificati (*in)[i].DeepCopyInto(&(*out)[i]) } } + return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederatedNotificationRouterSpec. @@ -401,6 +414,7 @@ func (in *FederatedNotificationSilence) DeepCopyInto(out *FederatedNotificationS *out = new(GenericFederatedStatus) (*in).DeepCopyInto(*out) } + return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederatedNotificationSilence. @@ -433,6 +447,7 @@ func (in *FederatedNotificationSilenceList) DeepCopyInto(out *FederatedNotificat (*in)[i].DeepCopyInto(&(*out)[i]) } } + return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederatedNotificationSilenceList. @@ -465,6 +480,7 @@ func (in *FederatedNotificationSilenceSpec) DeepCopyInto(out *FederatedNotificat (*in)[i].DeepCopyInto(&(*out)[i]) } } + return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederatedNotificationSilenceSpec. @@ -480,6 +496,7 @@ func (in *FederatedNotificationSilenceSpec) DeepCopy() *FederatedNotificationSil // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GenericClusterReference) DeepCopyInto(out *GenericClusterReference) { *out = *in + return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericClusterReference. @@ -495,6 +512,7 @@ func (in *GenericClusterReference) DeepCopy() *GenericClusterReference { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GenericClusterStatus) DeepCopyInto(out *GenericClusterStatus) { *out = *in + return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericClusterStatus. @@ -510,6 +528,7 @@ func (in *GenericClusterStatus) DeepCopy() *GenericClusterStatus { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GenericCondition) DeepCopyInto(out *GenericCondition) { *out = *in + return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericCondition. @@ -532,6 +551,7 @@ func (in *GenericFederatedResource) DeepCopyInto(out *GenericFederatedResource) *out = new(GenericFederatedStatus) (*in).DeepCopyInto(*out) } + return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericFederatedResource. @@ -563,6 +583,7 @@ func (in *GenericFederatedStatus) DeepCopyInto(out *GenericFederatedStatus) { *out = make([]GenericClusterStatus, len(*in)) copy(*out, *in) } + return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericFederatedStatus. @@ -585,6 +606,7 @@ func (in *GenericOverride) DeepCopyInto(out *GenericOverride) { *out = new(GenericOverrideSpec) (*in).DeepCopyInto(*out) } + return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericOverride. @@ -607,6 +629,7 @@ func (in *GenericOverrideItem) DeepCopyInto(out *GenericOverrideItem) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericOverrideItem. @@ -629,6 +652,7 @@ func (in *GenericOverrideSpec) DeepCopyInto(out *GenericOverrideSpec) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericOverrideSpec. @@ -647,6 +671,7 @@ func (in *GenericPlacement) DeepCopyInto(out *GenericPlacement) { out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) + return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericPlacement. @@ -672,6 +697,7 @@ func (in *GenericPlacementFields) DeepCopyInto(out *GenericPlacementFields) { *out = new(v1.LabelSelector) (*in).DeepCopyInto(*out) } + return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericPlacementFields. @@ -688,6 +714,7 @@ func (in *GenericPlacementFields) DeepCopy() *GenericPlacementFields { func (in *GenericPlacementSpec) DeepCopyInto(out *GenericPlacementSpec) { *out = *in in.Placement.DeepCopyInto(&out.Placement) + return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericPlacementSpec. @@ -705,6 +732,7 @@ func (in *NotificationConfigTemplate) DeepCopyInto(out *NotificationConfigTempla *out = *in in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) + return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NotificationConfigTemplate. @@ -722,6 +750,7 @@ func (in *NotificationManagerTemplate) DeepCopyInto(out *NotificationManagerTemp *out = *in in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) + return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NotificationManagerTemplate. @@ -739,6 +768,7 @@ func (in *NotificationReceiverTemplate) DeepCopyInto(out *NotificationReceiverTe *out = *in in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) + return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NotificationReceiverTemplate. @@ -756,6 +786,7 @@ func (in *NotificationRouterTemplate) DeepCopyInto(out *NotificationRouterTempla *out = *in in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) + return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NotificationRouterTemplate. @@ -773,6 +804,7 @@ func (in *NotificationSilenceTemplate) DeepCopyInto(out *NotificationSilenceTemp *out = *in in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) + return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NotificationSilenceTemplate.