diff --git a/pkg/collector/corechecks/cluster/orchestrator/transformers/k8s/persistentvolume.go b/pkg/collector/corechecks/cluster/orchestrator/transformers/k8s/persistentvolume.go index d7b9a059942e16..fc0272c5613096 100644 --- a/pkg/collector/corechecks/cluster/orchestrator/transformers/k8s/persistentvolume.go +++ b/pkg/collector/corechecks/cluster/orchestrator/transformers/k8s/persistentvolume.go @@ -95,14 +95,14 @@ func addAdditionalPersistentVolumeTags(pvModel *model.PersistentVolume) { pvModel.Tags = append(pvModel.Tags, additionalTags...) } -func extractPVSelector(ls []corev1.NodeSelectorRequirement) []*model.LabelSelectorRequirement { +func extractPVSelector(ls []corev1.NodeSelectorRequirement) []*model.NodeSelectorRequirement { if len(ls) == 0 { return nil } - labelSelectors := make([]*model.LabelSelectorRequirement, len(ls)) + labelSelectors := make([]*model.NodeSelectorRequirement, len(ls)) for i, v := range ls { - labelSelectors[i] = &model.LabelSelectorRequirement{ + labelSelectors[i] = &model.NodeSelectorRequirement{ Key: v.Key, Operator: string(v.Operator), Values: v.Values, diff --git a/pkg/collector/corechecks/cluster/orchestrator/transformers/k8s/persistentvolume_test.go b/pkg/collector/corechecks/cluster/orchestrator/transformers/k8s/persistentvolume_test.go index 07cf4591941bf7..ecb7564ca72445 100644 --- a/pkg/collector/corechecks/cluster/orchestrator/transformers/k8s/persistentvolume_test.go +++ b/pkg/collector/corechecks/cluster/orchestrator/transformers/k8s/persistentvolume_test.go @@ -276,14 +276,14 @@ func newExpectedPV() model.PersistentVolume { VolumeMode: string(filesystem), NodeAffinity: []*model.NodeSelectorTerm{ { - MatchExpressions: []*model.LabelSelectorRequirement{ + MatchExpressions: []*model.NodeSelectorRequirement{ { Key: "test-key3", Operator: string(corev1.NodeSelectorOpIn), Values: []string{"test-value1", "test-value3"}, }, }, - MatchFields: []*model.LabelSelectorRequirement{ + MatchFields: []*model.NodeSelectorRequirement{ { Key: "test-key2", Operator: string(corev1.NodeSelectorOpIn), @@ -292,7 +292,7 @@ func newExpectedPV() model.PersistentVolume { }, }, { - MatchExpressions: []*model.LabelSelectorRequirement{ + MatchExpressions: []*model.NodeSelectorRequirement{ { Key: "test-key3", Operator: string(corev1.NodeSelectorOpIn),