From d463f59d5bd58da4e044708a7375e23262b18c60 Mon Sep 17 00:00:00 2001 From: Alejandro Ruiz <4057165+aruiz14@users.noreply.github.com> Date: Tue, 31 Oct 2023 13:55:11 +0100 Subject: [PATCH] Remove leftovers from controller-gen migration (#1920) Co-authored-by: raul --- cmd/codegen/hack/generate_and_sort_crds.sh | 1 + cmd/codegen/main.go | 1 - .../clusterregistration/controller.go | 5 +- .../clusterregistrationtoken/handler.go | 5 +- .../controller/controllers/resources/data.go | 13 +- .../fleet.cattle.io/v1alpha1/bundle_types.go | 13 ++ .../v1alpha1/bundledeployment_types.go | 15 ++ .../v1alpha1/bundlenamespacemapping_types.go | 13 ++ .../fleet.cattle.io/v1alpha1/cluster_types.go | 15 ++ .../v1alpha1/clustergroup_types.go | 13 ++ .../v1alpha1/clusterregistration_types.go | 15 ++ .../clusterregistrationtoken_types.go | 13 ++ .../fleet.cattle.io/v1alpha1/content_types.go | 15 ++ .../fleet.cattle.io/v1alpha1/gitrepo_types.go | 13 ++ .../v1alpha1/gitreporestriction_types.go | 13 ++ .../v1alpha1/groupversion_info.go | 27 +++ .../v1alpha1/imagescan_types.go | 13 ++ ...d_deepcopy.go => zz_generated.deepcopy.go} | 88 +------- .../v1alpha1/zz_generated_list_types.go | 212 ------------------ .../v1alpha1/zz_generated_register.go | 90 -------- .../fleet.cattle.io/zz_generated_register.go | 24 -- pkg/apis/go.mod | 1 + pkg/apis/go.sum | 8 + 23 files changed, 202 insertions(+), 424 deletions(-) create mode 100644 pkg/apis/fleet.cattle.io/v1alpha1/groupversion_info.go rename pkg/apis/fleet.cattle.io/v1alpha1/{zz_generated_deepcopy.go => zz_generated.deepcopy.go} (98%) delete mode 100644 pkg/apis/fleet.cattle.io/v1alpha1/zz_generated_list_types.go delete mode 100644 pkg/apis/fleet.cattle.io/v1alpha1/zz_generated_register.go delete mode 100644 pkg/apis/fleet.cattle.io/zz_generated_register.go diff --git a/cmd/codegen/hack/generate_and_sort_crds.sh b/cmd/codegen/hack/generate_and_sort_crds.sh index c4d2ce6a7d..48778d2411 100644 --- a/cmd/codegen/hack/generate_and_sort_crds.sh +++ b/cmd/codegen/hack/generate_and_sort_crds.sh @@ -40,6 +40,7 @@ if ! $CONTROLLERGEN --version | grep -q "${CONTROLLERGEN_VERSION}" ; then fi # Run controller-gen +${CONTROLLERGEN} object:headerFile=scripts/boilerplate.go.txt,year="$(date +%Y)" paths="./pkg/apis/..." ${CONTROLLERGEN} crd webhook paths="./pkg/apis/..." output:stdout > $CRDS_YAML # Sort run_yq --slurp --sort-keys --explicit-start --yaml-output -i 'sort_by(.metadata.name)[]' $CRDS_YAML \ No newline at end of file diff --git a/cmd/codegen/main.go b/cmd/codegen/main.go index 88f349c2ce..04a85cbcc9 100644 --- a/cmd/codegen/main.go +++ b/cmd/codegen/main.go @@ -23,7 +23,6 @@ func main() { Types: []interface{}{ "./pkg/apis/fleet.cattle.io/v1alpha1", }, - GenerateTypes: true, }, }, }) diff --git a/internal/cmd/controller/controllers/clusterregistration/controller.go b/internal/cmd/controller/controllers/clusterregistration/controller.go index 972448c5ba..45595434d5 100644 --- a/internal/cmd/controller/controllers/clusterregistration/controller.go +++ b/internal/cmd/controller/controllers/clusterregistration/controller.go @@ -16,7 +16,6 @@ import ( "github.com/rancher/fleet/internal/config" fname "github.com/rancher/fleet/internal/name" "github.com/rancher/fleet/internal/registration" - fleetgroup "github.com/rancher/fleet/pkg/apis/fleet.cattle.io" fleet "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" "github.com/rancher/fleet/pkg/durations" fleetcontrollers "github.com/rancher/fleet/pkg/generated/controllers/fleet.cattle.io/v1alpha1" @@ -235,8 +234,8 @@ func (h *handler) OnChange(request *fleet.ClusterRegistration, status fleet.Clus Rules: []rbacv1.PolicyRule{ { Verbs: []string{"patch"}, - APIGroups: []string{fleetgroup.GroupName}, - Resources: []string{fleet.ClusterResourceName + "/status"}, + APIGroups: []string{fleet.SchemeGroupVersion.Group}, + Resources: []string{fleet.ClusterResourceNamePlural + "/status"}, ResourceNames: []string{cluster.Name}, }, }, diff --git a/internal/cmd/controller/controllers/clusterregistrationtoken/handler.go b/internal/cmd/controller/controllers/clusterregistrationtoken/handler.go index ff56fcbc5a..5f6d05e81a 100644 --- a/internal/cmd/controller/controllers/clusterregistrationtoken/handler.go +++ b/internal/cmd/controller/controllers/clusterregistrationtoken/handler.go @@ -11,7 +11,6 @@ import ( secretutil "github.com/rancher/fleet/internal/cmd/controller/secret" "github.com/rancher/fleet/internal/config" - fleetgroup "github.com/rancher/fleet/pkg/apis/fleet.cattle.io" fleet "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" fleetcontrollers "github.com/rancher/fleet/pkg/generated/controllers/fleet.cattle.io/v1alpha1" @@ -154,8 +153,8 @@ func (h *handler) OnChange(token *fleet.ClusterRegistrationToken, status fleet.C Rules: []rbacv1.PolicyRule{ { Verbs: []string{"create"}, - APIGroups: []string{fleetgroup.GroupName}, - Resources: []string{fleet.ClusterRegistrationResourceName}, + APIGroups: []string{fleet.SchemeGroupVersion.Group}, + Resources: []string{fleet.ClusterRegistrationResourceNamePlural}, }, }, }, diff --git a/internal/cmd/controller/controllers/resources/data.go b/internal/cmd/controller/controllers/resources/data.go index 586222d58d..fd347b8d60 100644 --- a/internal/cmd/controller/controllers/resources/data.go +++ b/internal/cmd/controller/controllers/resources/data.go @@ -1,7 +1,6 @@ package resources import ( - fleetgroup "github.com/rancher/fleet/pkg/apis/fleet.cattle.io" fleet "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" "github.com/rancher/wrangler/v2/pkg/apply" @@ -27,13 +26,13 @@ func ApplyBootstrapResources(systemNamespace, systemRegistrationNamespace string Rules: []rbacv1.PolicyRule{ { Verbs: []string{"get", "list", "watch"}, - APIGroups: []string{fleetgroup.GroupName}, - Resources: []string{fleet.BundleDeploymentResourceName}, + APIGroups: []string{fleet.SchemeGroupVersion.Group}, + Resources: []string{fleet.BundleDeploymentResourceNamePlural}, }, { Verbs: []string{"update"}, - APIGroups: []string{fleetgroup.GroupName}, - Resources: []string{fleet.BundleDeploymentResourceName + "/status"}, + APIGroups: []string{fleet.SchemeGroupVersion.Group}, + Resources: []string{fleet.BundleDeploymentResourceNamePlural + "/status"}, }, }, }, @@ -45,8 +44,8 @@ func ApplyBootstrapResources(systemNamespace, systemRegistrationNamespace string Rules: []rbacv1.PolicyRule{ { Verbs: []string{"get"}, - APIGroups: []string{fleetgroup.GroupName}, - Resources: []string{fleet.ContentResourceName}, + APIGroups: []string{fleet.SchemeGroupVersion.Group}, + Resources: []string{fleet.ContentResourceNamePlural}, }, }, }, diff --git a/pkg/apis/fleet.cattle.io/v1alpha1/bundle_types.go b/pkg/apis/fleet.cattle.io/v1alpha1/bundle_types.go index 66abe199cd..c321939adf 100644 --- a/pkg/apis/fleet.cattle.io/v1alpha1/bundle_types.go +++ b/pkg/apis/fleet.cattle.io/v1alpha1/bundle_types.go @@ -6,6 +6,10 @@ import ( "k8s.io/apimachinery/pkg/util/intstr" ) +func init() { + SchemeBuilder.Register(&Bundle{}, &BundleList{}) +} + var ( // Ready: Bundles have been deployed and all resources are ready. Ready BundleState = "Ready" @@ -70,6 +74,15 @@ type Bundle struct { Status BundleStatus `json:"status"` } +// +kubebuilder:object:root=true + +// BundleList contains a list of Bundle +type BundleList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Bundle `json:"items"` +} + type BundleSpec struct { BundleDeploymentOptions `json:",inline"` diff --git a/pkg/apis/fleet.cattle.io/v1alpha1/bundledeployment_types.go b/pkg/apis/fleet.cattle.io/v1alpha1/bundledeployment_types.go index 921f15c5b2..6beca6eabe 100644 --- a/pkg/apis/fleet.cattle.io/v1alpha1/bundledeployment_types.go +++ b/pkg/apis/fleet.cattle.io/v1alpha1/bundledeployment_types.go @@ -10,6 +10,12 @@ import ( "k8s.io/apimachinery/pkg/types" ) +const BundleDeploymentResourceNamePlural = "bundledeployments" + +func init() { + SchemeBuilder.Register(&BundleDeployment{}, &BundleDeploymentList{}) +} + // MaxHelmReleaseNameLen is the maximum length of a Helm release name. // See https://github.com/helm/helm/blob/293b50c65d4d56187cd4e2f390f0ada46b4c4737/pkg/chartutil/validate_name.go#L54-L61 const MaxHelmReleaseNameLen = 53 @@ -36,6 +42,15 @@ type BundleDeployment struct { Status BundleDeploymentStatus `json:"status,omitempty"` } +// +kubebuilder:object:root=true + +// BundleDeploymentList contains a list of BundleDeployment +type BundleDeploymentList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []BundleDeployment `json:"items"` +} + type BundleDeploymentOptions struct { // DefaultNamespace is the namespace to use for resources that do not // specify a namespace. This field is not used to enforce or lock down diff --git a/pkg/apis/fleet.cattle.io/v1alpha1/bundlenamespacemapping_types.go b/pkg/apis/fleet.cattle.io/v1alpha1/bundlenamespacemapping_types.go index 0b84c8653b..9a08b9f75c 100644 --- a/pkg/apis/fleet.cattle.io/v1alpha1/bundlenamespacemapping_types.go +++ b/pkg/apis/fleet.cattle.io/v1alpha1/bundlenamespacemapping_types.go @@ -4,6 +4,10 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +func init() { + SchemeBuilder.Register(&BundleNamespaceMapping{}, &BundleNamespaceMappingList{}) +} + // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +kubebuilder:object:root=true @@ -19,3 +23,12 @@ type BundleNamespaceMapping struct { // +nullable NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty"` } + +// +kubebuilder:object:root=true + +// BundleNamespaceMappingList contains a list of BundleNamespaceMapping +type BundleNamespaceMappingList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []BundleNamespaceMapping `json:"items"` +} diff --git a/pkg/apis/fleet.cattle.io/v1alpha1/cluster_types.go b/pkg/apis/fleet.cattle.io/v1alpha1/cluster_types.go index 84bd298040..14e2fe5021 100644 --- a/pkg/apis/fleet.cattle.io/v1alpha1/cluster_types.go +++ b/pkg/apis/fleet.cattle.io/v1alpha1/cluster_types.go @@ -6,6 +6,12 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +func init() { + SchemeBuilder.Register(&Cluster{}, &ClusterList{}) +} + +const ClusterResourceNamePlural = "clusters" + var ( // ClusterConditionReady indicates that all bundles in this cluster // have been deployed and all resources are ready. @@ -57,6 +63,15 @@ type Cluster struct { Status ClusterStatus `json:"status,omitempty"` } +// +kubebuilder:object:root=true + +// ClusterList contains a list of Cluster +type ClusterList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Cluster `json:"items"` +} + type ClusterSpec struct { // Paused if set to true, will stop any BundleDeployments from being updated. Paused bool `json:"paused,omitempty"` diff --git a/pkg/apis/fleet.cattle.io/v1alpha1/clustergroup_types.go b/pkg/apis/fleet.cattle.io/v1alpha1/clustergroup_types.go index 0287205e23..5b1c70af92 100644 --- a/pkg/apis/fleet.cattle.io/v1alpha1/clustergroup_types.go +++ b/pkg/apis/fleet.cattle.io/v1alpha1/clustergroup_types.go @@ -5,6 +5,10 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +func init() { + SchemeBuilder.Register(&ClusterGroup{}, &ClusterGroupList{}) +} + // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +kubebuilder:object:root=true @@ -25,6 +29,15 @@ type ClusterGroup struct { Status ClusterGroupStatus `json:"status"` } +// +kubebuilder:object:root=true + +// ClusterGroupList contains a list of ClusterGroup +type ClusterGroupList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ClusterGroup `json:"items"` +} + type ClusterGroupSpec struct { // Selector is a label selector, used to select clusters for this group. // +nullable diff --git a/pkg/apis/fleet.cattle.io/v1alpha1/clusterregistration_types.go b/pkg/apis/fleet.cattle.io/v1alpha1/clusterregistration_types.go index 44f68b59a5..95f1c27d40 100644 --- a/pkg/apis/fleet.cattle.io/v1alpha1/clusterregistration_types.go +++ b/pkg/apis/fleet.cattle.io/v1alpha1/clusterregistration_types.go @@ -4,6 +4,12 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +const ClusterRegistrationResourceNamePlural = "clusterregistrations" + +func init() { + SchemeBuilder.Register(&ClusterRegistration{}, &ClusterRegistrationList{}) +} + // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +kubebuilder:object:root=true @@ -20,6 +26,15 @@ type ClusterRegistration struct { Status ClusterRegistrationStatus `json:"status,omitempty"` } +// +kubebuilder:object:root=true + +// ClusterRegistrationList contains a list of ClusterRegistration +type ClusterRegistrationList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ClusterRegistration `json:"items"` +} + type ClusterRegistrationSpec struct { // ClientID is a unique string that will identify the cluster. The // agent either uses the configured ID or the kubeSystem.UID. diff --git a/pkg/apis/fleet.cattle.io/v1alpha1/clusterregistrationtoken_types.go b/pkg/apis/fleet.cattle.io/v1alpha1/clusterregistrationtoken_types.go index ea64317a23..cc701a76af 100644 --- a/pkg/apis/fleet.cattle.io/v1alpha1/clusterregistrationtoken_types.go +++ b/pkg/apis/fleet.cattle.io/v1alpha1/clusterregistrationtoken_types.go @@ -4,6 +4,10 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +func init() { + SchemeBuilder.Register(&ClusterRegistrationToken{}, &ClusterRegistrationTokenList{}) +} + // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +kubebuilder:object:root=true @@ -19,6 +23,15 @@ type ClusterRegistrationToken struct { Status ClusterRegistrationTokenStatus `json:"status,omitempty"` } +// +kubebuilder:object:root=true + +// ClusterRegistrationTokenList contains a list of ClusterRegistrationToken +type ClusterRegistrationTokenList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ClusterRegistrationToken `json:"items"` +} + type ClusterRegistrationTokenSpec struct { // TTL is the time to live for the token. It is used to calculate the // expiration time. If the token expires, it will be deleted. diff --git a/pkg/apis/fleet.cattle.io/v1alpha1/content_types.go b/pkg/apis/fleet.cattle.io/v1alpha1/content_types.go index 4e6f547a39..4d97ca1af5 100644 --- a/pkg/apis/fleet.cattle.io/v1alpha1/content_types.go +++ b/pkg/apis/fleet.cattle.io/v1alpha1/content_types.go @@ -4,6 +4,12 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +const ContentResourceNamePlural = "contents" + +func init() { + SchemeBuilder.Register(&Content{}, &ContentList{}) +} + // +genclient // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object @@ -23,3 +29,12 @@ type Content struct { // +nullable Content []byte `json:"content,omitempty"` } + +// +kubebuilder:object:root=true + +// ContentList contains a list of Content +type ContentList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Content `json:"items"` +} diff --git a/pkg/apis/fleet.cattle.io/v1alpha1/gitrepo_types.go b/pkg/apis/fleet.cattle.io/v1alpha1/gitrepo_types.go index cbe61656bf..b7faf9a672 100644 --- a/pkg/apis/fleet.cattle.io/v1alpha1/gitrepo_types.go +++ b/pkg/apis/fleet.cattle.io/v1alpha1/gitrepo_types.go @@ -5,6 +5,10 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +func init() { + SchemeBuilder.Register(&GitRepo{}, &GitRepoList{}) +} + var ( RepoLabel = "fleet.cattle.io/repo-name" BundleLabel = "fleet.cattle.io/bundle-name" @@ -32,6 +36,15 @@ type GitRepo struct { Status GitRepoStatus `json:"status,omitempty"` } +// +kubebuilder:object:root=true + +// GitRepoList contains a list of GitRepo +type GitRepoList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []GitRepo `json:"items"` +} + type GitRepoSpec struct { // Repo is a URL to a git repo to clone and index. // +nullable diff --git a/pkg/apis/fleet.cattle.io/v1alpha1/gitreporestriction_types.go b/pkg/apis/fleet.cattle.io/v1alpha1/gitreporestriction_types.go index 614566b4b9..ade20cdddc 100644 --- a/pkg/apis/fleet.cattle.io/v1alpha1/gitreporestriction_types.go +++ b/pkg/apis/fleet.cattle.io/v1alpha1/gitreporestriction_types.go @@ -4,6 +4,10 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +func init() { + SchemeBuilder.Register(&GitRepoRestriction{}, &GitRepoRestrictionList{}) +} + // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +kubebuilder:object:root=true @@ -41,3 +45,12 @@ type GitRepoRestriction struct { // +nullable AllowedTargetNamespaces []string `json:"allowedTargetNamespaces,omitempty"` } + +// +kubebuilder:object:root=true + +// GitRepoRestrictionList contains a list of GitRepoRestriction +type GitRepoRestrictionList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []GitRepoRestriction `json:"items"` +} diff --git a/pkg/apis/fleet.cattle.io/v1alpha1/groupversion_info.go b/pkg/apis/fleet.cattle.io/v1alpha1/groupversion_info.go new file mode 100644 index 0000000000..bdfa964112 --- /dev/null +++ b/pkg/apis/fleet.cattle.io/v1alpha1/groupversion_info.go @@ -0,0 +1,27 @@ +// Copyright (c) 2021-2023 SUSE LLC + +// Package v1alpha1 contains API Schema definitions for the fleet.cattle.io v1alpha1 API group +// +kubebuilder:object:generate=true +// +groupName=fleet.cattle.io +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +var ( + // SchemeGroupVersion is group version used to register these objects + SchemeGroupVersion = schema.GroupVersion{Group: "fleet.cattle.io", Version: "v1alpha1"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme + SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme +) + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} diff --git a/pkg/apis/fleet.cattle.io/v1alpha1/imagescan_types.go b/pkg/apis/fleet.cattle.io/v1alpha1/imagescan_types.go index aad61047e9..63e1cc41ca 100644 --- a/pkg/apis/fleet.cattle.io/v1alpha1/imagescan_types.go +++ b/pkg/apis/fleet.cattle.io/v1alpha1/imagescan_types.go @@ -6,6 +6,10 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +func init() { + SchemeBuilder.Register(&ImageScan{}, &ImageScanList{}) +} + // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +kubebuilder:object:root=true @@ -21,6 +25,15 @@ type ImageScan struct { Status ImageScanStatus `json:"status,omitempty"` } +// +kubebuilder:object:root=true + +// ImageScanList contains a list of ImageScan +type ImageScanList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ImageScan `json:"items"` +} + // API is taken from https://github.com/fluxcd/image-reflector-controller type ImageScanSpec struct { // TagName is the tag ref that needs to be put in manifest to replace fields diff --git a/pkg/apis/fleet.cattle.io/v1alpha1/zz_generated_deepcopy.go b/pkg/apis/fleet.cattle.io/v1alpha1/zz_generated.deepcopy.go similarity index 98% rename from pkg/apis/fleet.cattle.io/v1alpha1/zz_generated_deepcopy.go rename to pkg/apis/fleet.cattle.io/v1alpha1/zz_generated.deepcopy.go index 9fc5188ba5..4ca68362d6 100644 --- a/pkg/apis/fleet.cattle.io/v1alpha1/zz_generated_deepcopy.go +++ b/pkg/apis/fleet.cattle.io/v1alpha1/zz_generated.deepcopy.go @@ -17,16 +17,16 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by main. DO NOT EDIT. +// Code generated by controller-gen. DO NOT EDIT. package v1alpha1 import ( - genericcondition "github.com/rancher/wrangler/v2/pkg/genericcondition" + "github.com/rancher/wrangler/v2/pkg/genericcondition" corev1 "k8s.io/api/core/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" - intstr "k8s.io/apimachinery/pkg/util/intstr" + "k8s.io/apimachinery/pkg/util/intstr" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -43,7 +43,6 @@ func (in *AgentStatus) DeepCopyInto(out *AgentStatus) { *out = make([]string, len(*in)) copy(*out, *in) } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AgentStatus. @@ -59,7 +58,6 @@ func (in *AgentStatus) DeepCopy() *AgentStatus { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AlphabeticalPolicy) DeepCopyInto(out *AlphabeticalPolicy) { *out = *in - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlphabeticalPolicy. @@ -79,7 +77,6 @@ func (in *Bundle) DeepCopyInto(out *Bundle) { 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 Bundle. @@ -107,7 +104,6 @@ func (in *BundleDeployment) DeepCopyInto(out *BundleDeployment) { 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 BundleDeployment. @@ -131,7 +127,6 @@ func (in *BundleDeployment) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *BundleDeploymentDisplay) DeepCopyInto(out *BundleDeploymentDisplay) { *out = *in - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BundleDeploymentDisplay. @@ -156,7 +151,6 @@ func (in *BundleDeploymentList) DeepCopyInto(out *BundleDeploymentList) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BundleDeploymentList. @@ -224,7 +218,6 @@ func (in *BundleDeploymentOptions) DeepCopyInto(out *BundleDeploymentOptions) { } } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BundleDeploymentOptions. @@ -241,7 +234,6 @@ func (in *BundleDeploymentOptions) DeepCopy() *BundleDeploymentOptions { func (in *BundleDeploymentResource) DeepCopyInto(out *BundleDeploymentResource) { *out = *in in.CreatedAt.DeepCopyInto(&out.CreatedAt) - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BundleDeploymentResource. @@ -267,7 +259,6 @@ func (in *BundleDeploymentSpec) DeepCopyInto(out *BundleDeploymentSpec) { } } out.CorrectDrift = in.CorrectDrift - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BundleDeploymentSpec. @@ -313,7 +304,6 @@ func (in *BundleDeploymentStatus) DeepCopyInto(out *BundleDeploymentStatus) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BundleDeploymentStatus. @@ -329,7 +319,6 @@ func (in *BundleDeploymentStatus) DeepCopy() *BundleDeploymentStatus { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *BundleDisplay) DeepCopyInto(out *BundleDisplay) { *out = *in - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BundleDisplay. @@ -354,7 +343,6 @@ func (in *BundleList) DeepCopyInto(out *BundleList) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BundleList. @@ -390,7 +378,6 @@ func (in *BundleNamespaceMapping) DeepCopyInto(out *BundleNamespaceMapping) { *out = new(v1.LabelSelector) (*in).DeepCopyInto(*out) } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BundleNamespaceMapping. @@ -423,7 +410,6 @@ func (in *BundleNamespaceMappingList) DeepCopyInto(out *BundleNamespaceMappingLi (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BundleNamespaceMappingList. @@ -452,7 +438,6 @@ func (in *BundleRef) DeepCopyInto(out *BundleRef) { *out = new(v1.LabelSelector) (*in).DeepCopyInto(*out) } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BundleRef. @@ -468,7 +453,6 @@ func (in *BundleRef) DeepCopy() *BundleRef { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *BundleResource) DeepCopyInto(out *BundleResource) { *out = *in - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BundleResource. @@ -516,7 +500,6 @@ func (in *BundleSpec) DeepCopyInto(out *BundleSpec) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BundleSpec. @@ -551,7 +534,6 @@ func (in *BundleStatus) DeepCopyInto(out *BundleStatus) { *out = make([]ResourceKey, len(*in)) copy(*out, *in) } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BundleStatus. @@ -574,7 +556,6 @@ func (in *BundleSummary) DeepCopyInto(out *BundleSummary) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BundleSummary. @@ -601,7 +582,6 @@ func (in *BundleTarget) DeepCopyInto(out *BundleTarget) { *out = new(v1.LabelSelector) (*in).DeepCopyInto(*out) } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BundleTarget. @@ -627,7 +607,6 @@ func (in *BundleTargetRestriction) DeepCopyInto(out *BundleTargetRestriction) { *out = new(v1.LabelSelector) (*in).DeepCopyInto(*out) } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BundleTargetRestriction. @@ -647,7 +626,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. @@ -671,7 +649,6 @@ func (in *Cluster) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ClusterDisplay) DeepCopyInto(out *ClusterDisplay) { *out = *in - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterDisplay. @@ -691,7 +668,6 @@ func (in *ClusterGroup) DeepCopyInto(out *ClusterGroup) { 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 ClusterGroup. @@ -715,7 +691,6 @@ func (in *ClusterGroup) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ClusterGroupDisplay) DeepCopyInto(out *ClusterGroupDisplay) { *out = *in - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterGroupDisplay. @@ -740,7 +715,6 @@ func (in *ClusterGroupList) DeepCopyInto(out *ClusterGroupList) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterGroupList. @@ -769,7 +743,6 @@ func (in *ClusterGroupSpec) DeepCopyInto(out *ClusterGroupSpec) { *out = new(v1.LabelSelector) (*in).DeepCopyInto(*out) } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterGroupSpec. @@ -798,7 +771,6 @@ func (in *ClusterGroupStatus) DeepCopyInto(out *ClusterGroupStatus) { in.Summary.DeepCopyInto(&out.Summary) out.Display = in.Display out.ResourceCounts = in.ResourceCounts - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterGroupStatus. @@ -823,7 +795,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. @@ -851,7 +822,6 @@ func (in *ClusterRegistration) DeepCopyInto(out *ClusterRegistration) { 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 ClusterRegistration. @@ -884,7 +854,6 @@ func (in *ClusterRegistrationList) DeepCopyInto(out *ClusterRegistrationList) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRegistrationList. @@ -915,7 +884,6 @@ func (in *ClusterRegistrationSpec) DeepCopyInto(out *ClusterRegistrationSpec) { (*out)[key] = val } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRegistrationSpec. @@ -931,7 +899,6 @@ func (in *ClusterRegistrationSpec) DeepCopy() *ClusterRegistrationSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ClusterRegistrationStatus) DeepCopyInto(out *ClusterRegistrationStatus) { *out = *in - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRegistrationStatus. @@ -951,7 +918,6 @@ func (in *ClusterRegistrationToken) DeepCopyInto(out *ClusterRegistrationToken) 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 ClusterRegistrationToken. @@ -984,7 +950,6 @@ func (in *ClusterRegistrationTokenList) DeepCopyInto(out *ClusterRegistrationTok (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRegistrationTokenList. @@ -1013,7 +978,6 @@ func (in *ClusterRegistrationTokenSpec) DeepCopyInto(out *ClusterRegistrationTok *out = new(v1.Duration) **out = **in } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRegistrationTokenSpec. @@ -1033,7 +997,6 @@ func (in *ClusterRegistrationTokenStatus) DeepCopyInto(out *ClusterRegistrationT in, out := &in.Expires, &out.Expires *out = (*in).DeepCopy() } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRegistrationTokenStatus. @@ -1077,7 +1040,6 @@ func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) { *out = new(corev1.ResourceRequirements) (*in).DeepCopyInto(*out) } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSpec. @@ -1107,7 +1069,6 @@ func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus) { } out.Display = in.Display in.Agent.DeepCopyInto(&out.Agent) - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterStatus. @@ -1123,7 +1084,6 @@ func (in *ClusterStatus) DeepCopy() *ClusterStatus { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CommitSpec) DeepCopyInto(out *CommitSpec) { *out = *in - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommitSpec. @@ -1149,7 +1109,6 @@ func (in *ComparePatch) DeepCopyInto(out *ComparePatch) { *out = make([]string, len(*in)) copy(*out, *in) } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComparePatch. @@ -1166,7 +1125,6 @@ func (in *ComparePatch) DeepCopy() *ComparePatch { func (in *ConfigMapKeySelector) DeepCopyInto(out *ConfigMapKeySelector) { *out = *in out.LocalObjectReference = in.LocalObjectReference - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMapKeySelector. @@ -1189,7 +1147,6 @@ func (in *Content) DeepCopyInto(out *Content) { *out = make([]byte, len(*in)) copy(*out, *in) } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Content. @@ -1222,7 +1179,6 @@ func (in *ContentList) DeepCopyInto(out *ContentList) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContentList. @@ -1246,7 +1202,6 @@ func (in *ContentList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CorrectDrift) DeepCopyInto(out *CorrectDrift) { *out = *in - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CorrectDrift. @@ -1269,7 +1224,6 @@ func (in *DiffOptions) DeepCopyInto(out *DiffOptions) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiffOptions. @@ -1314,7 +1268,6 @@ func (in *FleetYAML) DeepCopyInto(out *FleetYAML) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FleetYAML. @@ -1344,7 +1297,6 @@ func (in *GitRepo) DeepCopyInto(out *GitRepo) { 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 GitRepo. @@ -1368,7 +1320,6 @@ func (in *GitRepo) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GitRepoDisplay) DeepCopyInto(out *GitRepoDisplay) { *out = *in - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitRepoDisplay. @@ -1393,7 +1344,6 @@ func (in *GitRepoList) DeepCopyInto(out *GitRepoList) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitRepoList. @@ -1424,7 +1374,6 @@ func (in *GitRepoResource) DeepCopyInto(out *GitRepoResource) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitRepoResource. @@ -1440,7 +1389,6 @@ func (in *GitRepoResource) DeepCopy() *GitRepoResource { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GitRepoResourceCounts) DeepCopyInto(out *GitRepoResourceCounts) { *out = *in - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitRepoResourceCounts. @@ -1478,7 +1426,6 @@ func (in *GitRepoRestriction) DeepCopyInto(out *GitRepoRestriction) { *out = make([]string, len(*in)) copy(*out, *in) } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitRepoRestriction. @@ -1511,7 +1458,6 @@ func (in *GitRepoRestrictionList) DeepCopyInto(out *GitRepoRestrictionList) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitRepoRestrictionList. @@ -1564,7 +1510,6 @@ func (in *GitRepoSpec) DeepCopyInto(out *GitRepoSpec) { } out.ImageScanCommit = in.ImageScanCommit out.CorrectDrift = in.CorrectDrift - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitRepoSpec. @@ -1601,7 +1546,6 @@ func (in *GitRepoStatus) DeepCopyInto(out *GitRepoStatus) { copy(*out, *in) } in.LastSyncedImageScanTime.DeepCopyInto(&out.LastSyncedImageScanTime) - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitRepoStatus. @@ -1627,7 +1571,6 @@ func (in *GitTarget) DeepCopyInto(out *GitTarget) { *out = new(v1.LabelSelector) (*in).DeepCopyInto(*out) } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitTarget. @@ -1659,7 +1602,6 @@ func (in *HelmOptions) DeepCopyInto(out *HelmOptions) { *out = make([]string, len(*in)) copy(*out, *in) } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmOptions. @@ -1688,7 +1630,6 @@ func (in *IgnoreOptions) DeepCopyInto(out *IgnoreOptions) { } } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IgnoreOptions. @@ -1714,7 +1655,6 @@ func (in *ImagePolicyChoice) DeepCopyInto(out *ImagePolicyChoice) { *out = new(AlphabeticalPolicy) **out = **in } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImagePolicyChoice. @@ -1734,7 +1674,6 @@ func (in *ImageScan) DeepCopyInto(out *ImageScan) { 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 ImageScan. @@ -1767,7 +1706,6 @@ func (in *ImageScanList) DeepCopyInto(out *ImageScanList) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageScanList. @@ -1798,7 +1736,6 @@ func (in *ImageScanSpec) DeepCopyInto(out *ImageScanSpec) { **out = **in } in.Policy.DeepCopyInto(&out.Policy) - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageScanSpec. @@ -1820,7 +1757,6 @@ func (in *ImageScanStatus) DeepCopyInto(out *ImageScanStatus) { copy(*out, *in) } in.LastScanTime.DeepCopyInto(&out.LastScanTime) - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageScanStatus. @@ -1837,7 +1773,6 @@ func (in *ImageScanStatus) DeepCopy() *ImageScanStatus { func (in *ImageScanYAML) DeepCopyInto(out *ImageScanYAML) { *out = *in in.ImageScanSpec.DeepCopyInto(&out.ImageScanSpec) - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageScanYAML. @@ -1853,7 +1788,6 @@ func (in *ImageScanYAML) DeepCopy() *ImageScanYAML { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *KustomizeOptions) DeepCopyInto(out *KustomizeOptions) { *out = *in - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KustomizeOptions. @@ -1869,7 +1803,6 @@ func (in *KustomizeOptions) DeepCopy() *KustomizeOptions { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *LocalObjectReference) DeepCopyInto(out *LocalObjectReference) { *out = *in - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalObjectReference. @@ -1885,7 +1818,6 @@ func (in *LocalObjectReference) DeepCopy() *LocalObjectReference { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ModifiedStatus) DeepCopyInto(out *ModifiedStatus) { *out = *in - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModifiedStatus. @@ -1913,7 +1845,6 @@ func (in *NonReadyResource) DeepCopyInto(out *NonReadyResource) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NonReadyResource. @@ -1930,7 +1861,6 @@ func (in *NonReadyResource) DeepCopy() *NonReadyResource { func (in *NonReadyStatus) DeepCopyInto(out *NonReadyStatus) { *out = *in in.Summary.DeepCopyInto(&out.Summary) - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NonReadyStatus. @@ -1946,7 +1876,6 @@ func (in *NonReadyStatus) DeepCopy() *NonReadyStatus { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Operation) DeepCopyInto(out *Operation) { *out = *in - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Operation. @@ -1977,7 +1906,6 @@ func (in *Partition) DeepCopyInto(out *Partition) { *out = new(v1.LabelSelector) (*in).DeepCopyInto(*out) } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Partition. @@ -1994,7 +1922,6 @@ func (in *Partition) DeepCopy() *Partition { func (in *PartitionStatus) DeepCopyInto(out *PartitionStatus) { *out = *in in.Summary.DeepCopyInto(&out.Summary) - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PartitionStatus. @@ -2010,7 +1937,6 @@ func (in *PartitionStatus) DeepCopy() *PartitionStatus { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ResourceKey) DeepCopyInto(out *ResourceKey) { *out = *in - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceKey. @@ -2030,7 +1956,6 @@ func (in *ResourcePerClusterState) DeepCopyInto(out *ResourcePerClusterState) { in, out := &in.Patch, &out.Patch *out = (*in).DeepCopy() } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourcePerClusterState. @@ -2068,7 +1993,6 @@ func (in *RolloutStrategy) DeepCopyInto(out *RolloutStrategy) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RolloutStrategy. @@ -2085,7 +2009,6 @@ func (in *RolloutStrategy) DeepCopy() *RolloutStrategy { func (in *SecretKeySelector) DeepCopyInto(out *SecretKeySelector) { *out = *in out.LocalObjectReference = in.LocalObjectReference - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretKeySelector. @@ -2101,7 +2024,6 @@ func (in *SecretKeySelector) DeepCopy() *SecretKeySelector { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SemVerPolicy) DeepCopyInto(out *SemVerPolicy) { *out = *in - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SemVerPolicy. @@ -2127,7 +2049,6 @@ func (in *ValuesFrom) DeepCopyInto(out *ValuesFrom) { *out = new(SecretKeySelector) **out = **in } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValuesFrom. @@ -2148,7 +2069,6 @@ func (in *YAMLOptions) DeepCopyInto(out *YAMLOptions) { *out = make([]string, len(*in)) copy(*out, *in) } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new YAMLOptions. diff --git a/pkg/apis/fleet.cattle.io/v1alpha1/zz_generated_list_types.go b/pkg/apis/fleet.cattle.io/v1alpha1/zz_generated_list_types.go deleted file mode 100644 index c28f058d65..0000000000 --- a/pkg/apis/fleet.cattle.io/v1alpha1/zz_generated_list_types.go +++ /dev/null @@ -1,212 +0,0 @@ -/* -Copyright (c) 2020 - 2023 SUSE LLC - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by main. DO NOT EDIT. - -// +k8s:deepcopy-gen=package -// +groupName=fleet.cattle.io -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// BundleList is a list of Bundle resources -type BundleList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []Bundle `json:"items"` -} - -func NewBundle(namespace, name string, obj Bundle) *Bundle { - obj.APIVersion, obj.Kind = SchemeGroupVersion.WithKind("Bundle").ToAPIVersionAndKind() - obj.Name = name - obj.Namespace = namespace - return &obj -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// BundleDeploymentList is a list of BundleDeployment resources -type BundleDeploymentList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []BundleDeployment `json:"items"` -} - -func NewBundleDeployment(namespace, name string, obj BundleDeployment) *BundleDeployment { - obj.APIVersion, obj.Kind = SchemeGroupVersion.WithKind("BundleDeployment").ToAPIVersionAndKind() - obj.Name = name - obj.Namespace = namespace - return &obj -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// BundleNamespaceMappingList is a list of BundleNamespaceMapping resources -type BundleNamespaceMappingList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []BundleNamespaceMapping `json:"items"` -} - -func NewBundleNamespaceMapping(namespace, name string, obj BundleNamespaceMapping) *BundleNamespaceMapping { - obj.APIVersion, obj.Kind = SchemeGroupVersion.WithKind("BundleNamespaceMapping").ToAPIVersionAndKind() - obj.Name = name - obj.Namespace = namespace - return &obj -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ClusterList is a list of Cluster resources -type ClusterList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []Cluster `json:"items"` -} - -func NewCluster(namespace, name string, obj Cluster) *Cluster { - obj.APIVersion, obj.Kind = SchemeGroupVersion.WithKind("Cluster").ToAPIVersionAndKind() - obj.Name = name - obj.Namespace = namespace - return &obj -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ClusterGroupList is a list of ClusterGroup resources -type ClusterGroupList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []ClusterGroup `json:"items"` -} - -func NewClusterGroup(namespace, name string, obj ClusterGroup) *ClusterGroup { - obj.APIVersion, obj.Kind = SchemeGroupVersion.WithKind("ClusterGroup").ToAPIVersionAndKind() - obj.Name = name - obj.Namespace = namespace - return &obj -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ClusterRegistrationList is a list of ClusterRegistration resources -type ClusterRegistrationList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []ClusterRegistration `json:"items"` -} - -func NewClusterRegistration(namespace, name string, obj ClusterRegistration) *ClusterRegistration { - obj.APIVersion, obj.Kind = SchemeGroupVersion.WithKind("ClusterRegistration").ToAPIVersionAndKind() - obj.Name = name - obj.Namespace = namespace - return &obj -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ClusterRegistrationTokenList is a list of ClusterRegistrationToken resources -type ClusterRegistrationTokenList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []ClusterRegistrationToken `json:"items"` -} - -func NewClusterRegistrationToken(namespace, name string, obj ClusterRegistrationToken) *ClusterRegistrationToken { - obj.APIVersion, obj.Kind = SchemeGroupVersion.WithKind("ClusterRegistrationToken").ToAPIVersionAndKind() - obj.Name = name - obj.Namespace = namespace - return &obj -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ContentList is a list of Content resources -type ContentList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []Content `json:"items"` -} - -func NewContent(namespace, name string, obj Content) *Content { - obj.APIVersion, obj.Kind = SchemeGroupVersion.WithKind("Content").ToAPIVersionAndKind() - obj.Name = name - obj.Namespace = namespace - return &obj -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// GitRepoList is a list of GitRepo resources -type GitRepoList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []GitRepo `json:"items"` -} - -func NewGitRepo(namespace, name string, obj GitRepo) *GitRepo { - obj.APIVersion, obj.Kind = SchemeGroupVersion.WithKind("GitRepo").ToAPIVersionAndKind() - obj.Name = name - obj.Namespace = namespace - return &obj -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// GitRepoRestrictionList is a list of GitRepoRestriction resources -type GitRepoRestrictionList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []GitRepoRestriction `json:"items"` -} - -func NewGitRepoRestriction(namespace, name string, obj GitRepoRestriction) *GitRepoRestriction { - obj.APIVersion, obj.Kind = SchemeGroupVersion.WithKind("GitRepoRestriction").ToAPIVersionAndKind() - obj.Name = name - obj.Namespace = namespace - return &obj -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ImageScanList is a list of ImageScan resources -type ImageScanList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []ImageScan `json:"items"` -} - -func NewImageScan(namespace, name string, obj ImageScan) *ImageScan { - obj.APIVersion, obj.Kind = SchemeGroupVersion.WithKind("ImageScan").ToAPIVersionAndKind() - obj.Name = name - obj.Namespace = namespace - return &obj -} diff --git a/pkg/apis/fleet.cattle.io/v1alpha1/zz_generated_register.go b/pkg/apis/fleet.cattle.io/v1alpha1/zz_generated_register.go deleted file mode 100644 index 7a481efcb8..0000000000 --- a/pkg/apis/fleet.cattle.io/v1alpha1/zz_generated_register.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -Copyright (c) 2020 - 2023 SUSE LLC - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by main. DO NOT EDIT. - -// +k8s:deepcopy-gen=package -// +groupName=fleet.cattle.io -package v1alpha1 - -import ( - fleet "github.com/rancher/fleet/pkg/apis/fleet.cattle.io" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - BundleResourceName = "bundles" - BundleDeploymentResourceName = "bundledeployments" - BundleNamespaceMappingResourceName = "bundlenamespacemappings" - ClusterResourceName = "clusters" - ClusterGroupResourceName = "clustergroups" - ClusterRegistrationResourceName = "clusterregistrations" - ClusterRegistrationTokenResourceName = "clusterregistrationtokens" - ContentResourceName = "contents" - GitRepoResourceName = "gitrepos" - GitRepoRestrictionResourceName = "gitreporestrictions" - ImageScanResourceName = "imagescans" -) - -// SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: fleet.GroupName, Version: "v1alpha1"} - -// Kind takes an unqualified kind and returns back a Group qualified GroupKind -func Kind(kind string) schema.GroupKind { - return SchemeGroupVersion.WithKind(kind).GroupKind() -} - -// Resource takes an unqualified resource and returns a Group qualified GroupResource -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -var ( - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - AddToScheme = SchemeBuilder.AddToScheme -) - -// Adds the list of known types to Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &Bundle{}, - &BundleList{}, - &BundleDeployment{}, - &BundleDeploymentList{}, - &BundleNamespaceMapping{}, - &BundleNamespaceMappingList{}, - &Cluster{}, - &ClusterList{}, - &ClusterGroup{}, - &ClusterGroupList{}, - &ClusterRegistration{}, - &ClusterRegistrationList{}, - &ClusterRegistrationToken{}, - &ClusterRegistrationTokenList{}, - &Content{}, - &ContentList{}, - &GitRepo{}, - &GitRepoList{}, - &GitRepoRestriction{}, - &GitRepoRestrictionList{}, - &ImageScan{}, - &ImageScanList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/pkg/apis/fleet.cattle.io/zz_generated_register.go b/pkg/apis/fleet.cattle.io/zz_generated_register.go deleted file mode 100644 index 5f7e06cb02..0000000000 --- a/pkg/apis/fleet.cattle.io/zz_generated_register.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -Copyright (c) 2020 - 2023 SUSE LLC - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by main. DO NOT EDIT. - -package fleet - -const ( - // Package-wide consts from generator "zz_generated_register". - GroupName = "fleet.cattle.io" -) diff --git a/pkg/apis/go.mod b/pkg/apis/go.mod index 45ad960595..3b69a9d391 100644 --- a/pkg/apis/go.mod +++ b/pkg/apis/go.mod @@ -6,6 +6,7 @@ require ( github.com/rancher/wrangler/v2 v2.1.1 k8s.io/api v0.28.0 k8s.io/apimachinery v0.28.0 + sigs.k8s.io/controller-runtime v0.11.0 ) require ( diff --git a/pkg/apis/go.sum b/pkg/apis/go.sum index ee93262f0c..6d34c1d483 100644 --- a/pkg/apis/go.sum +++ b/pkg/apis/go.sum @@ -1,6 +1,7 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -21,6 +22,9 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/gomega v1.17.0 h1:9Luw4uT5HTjHTN8+aNcSThgH1vdXnmdJ8xIfZ4wyTRE= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rancher/wrangler/v2 v2.1.1 h1:EWAg2UNm+6EEACsUf/Pc7lcjswFpfkU2mCaQdxUkRPM= @@ -49,6 +53,7 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= @@ -65,6 +70,7 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= @@ -79,6 +85,8 @@ k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrC k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/cli-utils v0.28.0 h1:gsvwqygoXlW2y8CmKdflQJNZp1Yhi4geATW3/Ei7oYc= sigs.k8s.io/cli-utils v0.28.0/go.mod h1:WDVRa5/eQBKntG++uyKdyT+xU7MLdCR4XsgseqL5uX4= +sigs.k8s.io/controller-runtime v0.11.0 h1:DqO+c8mywcZLFJWILq4iktoECTyn30Bkj0CwgqMpZWQ= +sigs.k8s.io/controller-runtime v0.11.0/go.mod h1:KKwLiTooNGu+JmLZGn9Sl3Gjmfj66eMbCQznLP5zcqA= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE=