From edae80dd8a7963900cb8cf39b48e0e44420e9503 Mon Sep 17 00:00:00 2001 From: Alejandro Ruiz Date: Thu, 30 Jan 2025 16:37:51 +0100 Subject: [PATCH] breaking: replace PerClusterState format in Resources --- charts/fleet-crd/templates/crds.yaml | 188 ++++++++++-------- internal/resourcestatus/resourcekey.go | 132 ++++++------ internal/resourcestatus/resourcekey_test.go | 26 +-- .../fleet.cattle.io/v1alpha1/gitrepo_types.go | 22 -- .../v1alpha1/resource_types.go | 24 ++- pkg/apis/fleet.cattle.io/v1alpha1/status.go | 2 - .../v1alpha1/zz_generated.deepcopy.go | 87 +++++--- 7 files changed, 253 insertions(+), 228 deletions(-) diff --git a/charts/fleet-crd/templates/crds.yaml b/charts/fleet-crd/templates/crds.yaml index a15cb88d9b..990a36c65b 100644 --- a/charts/fleet-crd/templates/crds.yaml +++ b/charts/fleet-crd/templates/crds.yaml @@ -6776,12 +6776,6 @@ spec: waiting to be applied. type: integer type: object - resourceErrors: - description: ResourceErrors is a sorted list of errors from the - resources. - items: - type: string - type: array resources: description: Resources contains metadata about the resources of each bundle. @@ -6828,45 +6822,59 @@ spec: nullable: true type: string perClusterState: - description: PerClusterState is a list of states for each - cluster. Derived from the summaries non-ready resources. - items: - description: ResourcePerClusterState is generated for each - non-ready resource of the bundles. - properties: - clusterId: - description: ClusterID is the id of the cluster. - nullable: true + description: PerClusterState contains lists of cluster IDs + for every State for this resource + nullable: true + properties: + missing: + description: Missing is a list of cluster IDs for which + this a resource is in Missing state + items: type: string - error: - description: Error is true if the resource is in an - error state, copied from the bundle's summary for - non-ready resources. - type: boolean - message: - description: Message combines the messages from the - bundle's summary. Messages are joined with the delimiter - ';'. - nullable: true + type: array + modified: + description: Modified is a list of cluster IDs for which + this a resource is in Modified state + items: type: string - patch: - description: Patch for modified resources. - nullable: true - type: object - x-kubernetes-preserve-unknown-fields: true - state: - description: State is the state of the resource. - nullable: true + type: array + notReady: + description: NotReady is a list of cluster IDs for which + this a resource is in NotReady state + items: type: string - transitioning: - description: 'Transitioning is true if the resource - is in a transitioning state, - - copied from the bundle''s summary for non-ready resources.' - type: boolean - type: object - nullable: true - type: array + type: array + orphaned: + description: Orphaned is a list of cluster IDs for which + this a resource is in Orphaned state + items: + type: string + type: array + pending: + description: Pending is a list of cluster IDs for which + this a resource is in Pending state + items: + type: string + type: array + ready: + description: Ready is a list of cluster IDs for which + this a resource is in Ready state + items: + type: string + type: array + unknown: + description: Unknown is a list of cluster IDs for which + this a resource is in Unknown state + items: + type: string + type: array + waitApplied: + description: WaitApplied is a list of cluster IDs for + which this a resource is in WaitApplied state + items: + type: string + type: array + type: object state: description: State is the state of the resource, e.g. "Unknown", "WaitApplied", "ErrApplied" or "Ready". @@ -6879,6 +6887,8 @@ spec: description: Type is the type of the resource, e.g. "apiextensions.k8s.io.customresourcedefinition" or "configmap". type: string + required: + - perClusterState type: object type: array summary: @@ -8647,12 +8657,6 @@ spec: waiting to be applied. type: integer type: object - resourceErrors: - description: ResourceErrors is a sorted list of errors from the - resources. - items: - type: string - type: array resources: description: Resources contains metadata about the resources of each bundle. @@ -8699,45 +8703,59 @@ spec: nullable: true type: string perClusterState: - description: PerClusterState is a list of states for each - cluster. Derived from the summaries non-ready resources. - items: - description: ResourcePerClusterState is generated for each - non-ready resource of the bundles. - properties: - clusterId: - description: ClusterID is the id of the cluster. - nullable: true + description: PerClusterState contains lists of cluster IDs + for every State for this resource + nullable: true + properties: + missing: + description: Missing is a list of cluster IDs for which + this a resource is in Missing state + items: type: string - error: - description: Error is true if the resource is in an - error state, copied from the bundle's summary for - non-ready resources. - type: boolean - message: - description: Message combines the messages from the - bundle's summary. Messages are joined with the delimiter - ';'. - nullable: true + type: array + modified: + description: Modified is a list of cluster IDs for which + this a resource is in Modified state + items: type: string - patch: - description: Patch for modified resources. - nullable: true - type: object - x-kubernetes-preserve-unknown-fields: true - state: - description: State is the state of the resource. - nullable: true + type: array + notReady: + description: NotReady is a list of cluster IDs for which + this a resource is in NotReady state + items: type: string - transitioning: - description: 'Transitioning is true if the resource - is in a transitioning state, - - copied from the bundle''s summary for non-ready resources.' - type: boolean - type: object - nullable: true - type: array + type: array + orphaned: + description: Orphaned is a list of cluster IDs for which + this a resource is in Orphaned state + items: + type: string + type: array + pending: + description: Pending is a list of cluster IDs for which + this a resource is in Pending state + items: + type: string + type: array + ready: + description: Ready is a list of cluster IDs for which + this a resource is in Ready state + items: + type: string + type: array + unknown: + description: Unknown is a list of cluster IDs for which + this a resource is in Unknown state + items: + type: string + type: array + waitApplied: + description: WaitApplied is a list of cluster IDs for + which this a resource is in WaitApplied state + items: + type: string + type: array + type: object state: description: State is the state of the resource, e.g. "Unknown", "WaitApplied", "ErrApplied" or "Ready". @@ -8750,6 +8768,8 @@ spec: description: Type is the type of the resource, e.g. "apiextensions.k8s.io.customresourcedefinition" or "configmap". type: string + required: + - perClusterState type: object type: array summary: diff --git a/internal/resourcestatus/resourcekey.go b/internal/resourcestatus/resourcekey.go index f7c1aa7231..c9d0949f5c 100644 --- a/internal/resourcestatus/resourcekey.go +++ b/internal/resourcestatus/resourcekey.go @@ -1,7 +1,6 @@ package resourcestatus import ( - "encoding/json" "sort" "strings" @@ -10,8 +9,7 @@ import ( ) func SetResources(list []fleet.BundleDeployment, status *fleet.StatusBase) { - byCluster, errors := fromResources(list) - status.ResourceErrors = errors + byCluster := fromResources(list) status.Resources = aggregateResourceStatesClustersMap(byCluster) status.ResourceCounts = sumResourceCounts(list) status.PerClusterResourceCounts = resourceCountsPerCluster(list) @@ -38,7 +36,8 @@ func resourceCountsPerCluster(items []fleet.BundleDeployment) map[string]*fleet. } type resourceStateEntry struct { - fleet.ResourcePerClusterState + state string + clusterID string incomplete bool } @@ -50,32 +49,19 @@ func clusterID(bd fleet.BundleDeployment) string { // fromResources inspects a list of BundleDeployments and returns a list of per-cluster states per resource keys. // It also returns a list of errors messages produced that may have occurred during processing -func fromResources(items []fleet.BundleDeployment) (resourceStatesByResourceKey, []string) { +func fromResources(items []fleet.BundleDeployment) resourceStatesByResourceKey { sort.Slice(items, func(i, j int) bool { return clusterID(items[i]) < clusterID(items[j]) }) - var ( - errors []string - resources = make(resourceStatesByResourceKey) - ) - for _, bd := range items { - clusterID := bd.Labels[fleet.ClusterNamespaceLabel] + "/" + bd.Labels[fleet.ClusterLabel] - bdResources, errs := bundleDeploymentResources(bd) - if len(errs) > 0 { - for _, err := range errs { - errors = append(errors, err.Error()) - } - } - for key, state := range bdResources { - state.ClusterID = clusterID - resources[key] = append(resources[key], resourceStateEntry{state, bd.Status.IncompleteState}) + resources := make(resourceStatesByResourceKey) + for _, bd := range items { + for key, entry := range bundleDeploymentResources(bd) { + resources[key] = append(resources[key], entry) } } - sort.Strings(errors) - - return resources, errors + return resources } func resourceId(namespace, name string) string { @@ -95,10 +81,12 @@ func toType(apiVersion, kind string) string { return group + strings.ToLower(kind) } -func bundleDeploymentResources(bd fleet.BundleDeployment) (map[fleet.ResourceKey]fleet.ResourcePerClusterState, []error) { +func bundleDeploymentResources(bd fleet.BundleDeployment) map[fleet.ResourceKey]resourceStateEntry { + clusterID := bd.Labels[fleet.ClusterNamespaceLabel] + "/" + bd.Labels[fleet.ClusterLabel] defaultState := string(summary.GetDeploymentState(&bd)) + incomplete := bd.Status.IncompleteState - resources := make(map[fleet.ResourceKey]fleet.ResourcePerClusterState, len(bd.Status.Resources)) + resources := make(map[fleet.ResourceKey]resourceStateEntry, len(bd.Status.Resources)) for _, bdResource := range bd.Status.Resources { resourceKey := fleet.ResourceKey{ Kind: bdResource.Kind, @@ -106,8 +94,10 @@ func bundleDeploymentResources(bd fleet.BundleDeployment) (map[fleet.ResourceKey Name: bdResource.Name, Namespace: bdResource.Namespace, } - resources[resourceKey] = fleet.ResourcePerClusterState{ - State: defaultState, + resources[resourceKey] = resourceStateEntry{ + state: defaultState, + clusterID: clusterID, + incomplete: incomplete, } } @@ -118,15 +108,13 @@ func bundleDeploymentResources(bd fleet.BundleDeployment) (map[fleet.ResourceKey Namespace: nonReady.Namespace, Name: nonReady.Name, } - resources[resourceKey] = fleet.ResourcePerClusterState{ - State: nonReady.Summary.State, - Error: nonReady.Summary.Error, - Transitioning: nonReady.Summary.Transitioning, - Message: strings.Join(nonReady.Summary.Message, "; "), + resources[resourceKey] = resourceStateEntry{ + state: nonReady.Summary.State, + clusterID: clusterID, + incomplete: incomplete, } } - var errors []error for _, modified := range bd.Status.ModifiedStatus { key := fleet.ResourceKey{ Kind: modified.Kind, @@ -134,64 +122,51 @@ func bundleDeploymentResources(bd fleet.BundleDeployment) (map[fleet.ResourceKey Namespace: modified.Namespace, Name: modified.Name, } - state := fleet.ResourcePerClusterState{ - State: "Modified", - } + state := "Modified" if modified.Delete { - state.State = "Orphaned" + state = "Orphaned" } else if modified.Create { - state.State = "Missing" - } else if len(modified.Patch) > 0 { - state.Patch = &fleet.GenericMap{} - if err := json.Unmarshal([]byte(modified.Patch), state.Patch); err != nil { - errors = append(errors, err) - } + state = "Missing" + } + resources[key] = resourceStateEntry{ + state: state, + clusterID: clusterID, + incomplete: incomplete, } - resources[key] = state } - return resources, errors + return resources } func aggregateResourceStatesClustersMap(resourceKeyStates resourceStatesByResourceKey) []fleet.Resource { - byResourceKey := make(map[fleet.ResourceKey]*fleet.Resource) + result := make([]fleet.Resource, 0, len(resourceKeyStates)) for resourceKey, entries := range resourceKeyStates { - if _, ok := byResourceKey[resourceKey]; !ok { - byResourceKey[resourceKey] = &fleet.Resource{ - Kind: resourceKey.Kind, - APIVersion: resourceKey.APIVersion, - Namespace: resourceKey.Namespace, - Name: resourceKey.Name, - State: "Ready", - Type: toType(resourceKey.APIVersion, resourceKey.Kind), - ID: resourceId(resourceKey.Namespace, resourceKey.Name), - } + resource := &fleet.Resource{ + Kind: resourceKey.Kind, + APIVersion: resourceKey.APIVersion, + Namespace: resourceKey.Namespace, + Name: resourceKey.Name, + State: "Ready", + Type: toType(resourceKey.APIVersion, resourceKey.Kind), + ID: resourceId(resourceKey.Namespace, resourceKey.Name), } - resource := byResourceKey[resourceKey] for _, entry := range entries { if entry.incomplete { resource.IncompleteState = true } - // "Ready" states are currently omitted - if entry.State == "Ready" { - continue - } - - resource.PerClusterState = append(resource.PerClusterState, entry.ResourcePerClusterState) + appendToPerClusterState(&resource.PerClusterState, entry.state, entry.clusterID) // top-level state is set from first non "Ready" per-cluster state if resource.State == "Ready" { - resource.State = entry.State + resource.State = entry.state } } - } - result := make([]fleet.Resource, 0, len(byResourceKey)) - for _, resource := range byResourceKey { result = append(result, *resource) } + sort.Slice(result, func(i, j int) bool { return key(result[i]) < key(result[j]) }) @@ -199,6 +174,29 @@ func aggregateResourceStatesClustersMap(resourceKeyStates resourceStatesByResour return result } +func appendToPerClusterState(states *fleet.PerClusterState, state, clusterID string) { + switch state { + case "Ready": + states.Ready = append(states.Ready, clusterID) + case "WaitApplied": + states.WaitApplied = append(states.WaitApplied, clusterID) + case "Pending": + states.Pending = append(states.Pending, clusterID) + case "Modified": + states.Modified = append(states.Modified, clusterID) + case "NotReady": + states.NotReady = append(states.NotReady, clusterID) + case "Orphaned": + states.Orphaned = append(states.Orphaned, clusterID) + case "Missing": + states.Missing = append(states.Missing, clusterID) + case "Unknown": + states.Unknown = append(states.Unknown, clusterID) + default: + // ignore + } +} + func sumResourceCounts(items []fleet.BundleDeployment) fleet.ResourceCounts { var res fleet.ResourceCounts for _, bd := range items { diff --git a/internal/resourcestatus/resourcekey_test.go b/internal/resourcestatus/resourcekey_test.go index 7d8dc965d2..882ac03c23 100644 --- a/internal/resourcestatus/resourcekey_test.go +++ b/internal/resourcestatus/resourcekey_test.go @@ -166,19 +166,10 @@ func TestSetResources(t *testing.T) { Error: false, Transitioning: false, Message: "", - PerClusterState: []fleet.ResourcePerClusterState{ - { - State: "WaitApplied", - ClusterID: "c-ns1/cluster1", - }, - { - State: "Pending", - ClusterID: "c-ns2/cluster1", - Error: true, - Transitioning: true, - Message: "message1; message2", - Patch: nil, - }, + PerClusterState: fleet.PerClusterState{ + Ready: []string{"c-ns1/cluster2"}, + WaitApplied: []string{"c-ns1/cluster1"}, + Pending: []string{"c-ns2/cluster1"}, }, }) assert.Contains(t, status.Resources, fleet.Resource{ @@ -195,16 +186,11 @@ func TestSetResources(t *testing.T) { Error: false, Transitioning: false, Message: "", - PerClusterState: []fleet.ResourcePerClusterState{ - { - State: "WaitApplied", - ClusterID: "c-ns1/cluster1", - }, + PerClusterState: fleet.PerClusterState{ + WaitApplied: []string{"c-ns1/cluster1"}, }, }) - assert.Empty(t, status.ResourceErrors) - assert.Equal(t, fleet.ResourceCounts{ Ready: 2, DesiredReady: 5, diff --git a/pkg/apis/fleet.cattle.io/v1alpha1/gitrepo_types.go b/pkg/apis/fleet.cattle.io/v1alpha1/gitrepo_types.go index 76d00319c2..5804f282bd 100644 --- a/pkg/apis/fleet.cattle.io/v1alpha1/gitrepo_types.go +++ b/pkg/apis/fleet.cattle.io/v1alpha1/gitrepo_types.go @@ -193,28 +193,6 @@ type GitRepoDisplay struct { Error bool `json:"error,omitempty"` } -// ResourcePerClusterState is generated for each non-ready resource of the bundles. -type ResourcePerClusterState struct { - // State is the state of the resource. - // +nullable - State string `json:"state,omitempty"` - // Error is true if the resource is in an error state, copied from the bundle's summary for non-ready resources. - Error bool `json:"error,omitempty"` - // Transitioning is true if the resource is in a transitioning state, - // copied from the bundle's summary for non-ready resources. - Transitioning bool `json:"transitioning,omitempty"` - // Message combines the messages from the bundle's summary. Messages are joined with the delimiter ';'. - // +nullable - Message string `json:"message,omitempty"` - // Patch for modified resources. - // +nullable - // +kubebuilder:validation:XPreserveUnknownFields - Patch *GenericMap `json:"patch,omitempty"` - // ClusterID is the id of the cluster. - // +nullable - ClusterID string `json:"clusterId,omitempty"` -} - // CommitSpec specifies how to commit changes to the git repository type CommitSpec struct { // AuthorName gives the name to provide when making a commit diff --git a/pkg/apis/fleet.cattle.io/v1alpha1/resource_types.go b/pkg/apis/fleet.cattle.io/v1alpha1/resource_types.go index 07af039d80..6b1b92d66a 100644 --- a/pkg/apis/fleet.cattle.io/v1alpha1/resource_types.go +++ b/pkg/apis/fleet.cattle.io/v1alpha1/resource_types.go @@ -32,9 +32,29 @@ type Resource struct { // Message is the first message from the PerClusterStates. // +nullable Message string `json:"message,omitempty"` - // PerClusterState is a list of states for each cluster. Derived from the summaries non-ready resources. + // PerClusterState contains lists of cluster IDs for every State for this resource // +nullable - PerClusterState []ResourcePerClusterState `json:"perClusterState,omitempty"` + PerClusterState PerClusterState `json:"perClusterState"` +} + +// PerClusterState aggregates list of cluster IDs per state for a given Resource +type PerClusterState struct { + // Ready is a list of cluster IDs for which this a resource is in Ready state + Ready []string `json:"ready,omitempty"` + // WaitApplied is a list of cluster IDs for which this a resource is in WaitApplied state + WaitApplied []string `json:"waitApplied,omitempty"` + // Pending is a list of cluster IDs for which this a resource is in Pending state + Pending []string `json:"pending,omitempty"` + // Modified is a list of cluster IDs for which this a resource is in Modified state + Modified []string `json:"modified,omitempty"` + // Orphaned is a list of cluster IDs for which this a resource is in Orphaned state + Orphaned []string `json:"orphaned,omitempty"` + // Missing is a list of cluster IDs for which this a resource is in Missing state + Missing []string `json:"missing,omitempty"` + // Unknown is a list of cluster IDs for which this a resource is in Unknown state + Unknown []string `json:"unknown,omitempty"` + // NotReady is a list of cluster IDs for which this a resource is in NotReady state + NotReady []string `json:"notReady,omitempty"` } // ResourceCounts contains the number of resources in each state. diff --git a/pkg/apis/fleet.cattle.io/v1alpha1/status.go b/pkg/apis/fleet.cattle.io/v1alpha1/status.go index 1866992dd1..9806050480 100644 --- a/pkg/apis/fleet.cattle.io/v1alpha1/status.go +++ b/pkg/apis/fleet.cattle.io/v1alpha1/status.go @@ -21,8 +21,6 @@ type StatusBase struct { Resources []Resource `json:"resources,omitempty"` // ResourceCounts contains the number of resources in each state over all bundles. ResourceCounts ResourceCounts `json:"resourceCounts,omitempty"` - // ResourceErrors is a sorted list of errors from the resources. - ResourceErrors []string `json:"resourceErrors,omitempty"` // PerClusterResourceCounts contains the number of resources in each state over all bundles, per cluster. PerClusterResourceCounts map[string]*ResourceCounts `json:"perClusterResourceCounts,omitempty"` } diff --git a/pkg/apis/fleet.cattle.io/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/fleet.cattle.io/v1alpha1/zz_generated.deepcopy.go index d78d397a6c..73abaa7554 100644 --- a/pkg/apis/fleet.cattle.io/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/fleet.cattle.io/v1alpha1/zz_generated.deepcopy.go @@ -2048,72 +2048,102 @@ func (in *PartitionStatus) DeepCopy() *PartitionStatus { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Resource) DeepCopyInto(out *Resource) { +func (in *PerClusterState) DeepCopyInto(out *PerClusterState) { *out = *in - if in.PerClusterState != nil { - in, out := &in.PerClusterState, &out.PerClusterState - *out = make([]ResourcePerClusterState, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } + if in.Ready != nil { + in, out := &in.Ready, &out.Ready + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.WaitApplied != nil { + in, out := &in.WaitApplied, &out.WaitApplied + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Pending != nil { + in, out := &in.Pending, &out.Pending + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Modified != nil { + in, out := &in.Modified, &out.Modified + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Orphaned != nil { + in, out := &in.Orphaned, &out.Orphaned + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Missing != nil { + in, out := &in.Missing, &out.Missing + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Unknown != nil { + in, out := &in.Unknown, &out.Unknown + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.NotReady != nil { + in, out := &in.NotReady, &out.NotReady + *out = make([]string, len(*in)) + copy(*out, *in) } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Resource. -func (in *Resource) DeepCopy() *Resource { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerClusterState. +func (in *PerClusterState) DeepCopy() *PerClusterState { if in == nil { return nil } - out := new(Resource) + out := new(PerClusterState) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceCounts) DeepCopyInto(out *ResourceCounts) { +func (in *Resource) DeepCopyInto(out *Resource) { *out = *in + in.PerClusterState.DeepCopyInto(&out.PerClusterState) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceCounts. -func (in *ResourceCounts) DeepCopy() *ResourceCounts { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Resource. +func (in *Resource) DeepCopy() *Resource { if in == nil { return nil } - out := new(ResourceCounts) + out := new(Resource) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceKey) DeepCopyInto(out *ResourceKey) { +func (in *ResourceCounts) DeepCopyInto(out *ResourceCounts) { *out = *in } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceKey. -func (in *ResourceKey) DeepCopy() *ResourceKey { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceCounts. +func (in *ResourceCounts) DeepCopy() *ResourceCounts { if in == nil { return nil } - out := new(ResourceKey) + out := new(ResourceCounts) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourcePerClusterState) DeepCopyInto(out *ResourcePerClusterState) { +func (in *ResourceKey) DeepCopyInto(out *ResourceKey) { *out = *in - if in.Patch != nil { - in, out := &in.Patch, &out.Patch - *out = (*in).DeepCopy() - } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourcePerClusterState. -func (in *ResourcePerClusterState) DeepCopy() *ResourcePerClusterState { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceKey. +func (in *ResourceKey) DeepCopy() *ResourceKey { if in == nil { return nil } - out := new(ResourcePerClusterState) + out := new(ResourceKey) in.DeepCopyInto(out) return out } @@ -2204,11 +2234,6 @@ func (in *StatusBase) DeepCopyInto(out *StatusBase) { } } out.ResourceCounts = in.ResourceCounts - if in.ResourceErrors != nil { - in, out := &in.ResourceErrors, &out.ResourceErrors - *out = make([]string, len(*in)) - copy(*out, *in) - } if in.PerClusterResourceCounts != nil { in, out := &in.PerClusterResourceCounts, &out.PerClusterResourceCounts *out = make(map[string]*ResourceCounts, len(*in))