diff --git a/pkg/operator/controllers/autosizednodes/autosizednodes_controller.go b/pkg/operator/controllers/autosizednodes/autosizednodes_controller.go index 016a3babfd3..bec92d2d848 100644 --- a/pkg/operator/controllers/autosizednodes/autosizednodes_controller.go +++ b/pkg/operator/controllers/autosizednodes/autosizednodes_controller.go @@ -126,8 +126,11 @@ func makeConfig() mcv1.KubeletConfig { Spec: mcv1.KubeletConfigSpec{ AutoSizingReserved: util.BoolToPtr(true), MachineConfigPoolSelector: &metav1.LabelSelector{ - MatchLabels: map[string]string{ - "pools.operator.machineconfiguration.openshift.io/worker": "", + MatchExpressions: []metav1.LabelSelectorRequirement{ + { + Key: "machineconfiguration.openshift.io/mco-built-in", + Operator: metav1.LabelSelectorOpExists, + }, }, }, }, diff --git a/pkg/operator/controllers/autosizednodes/autosizednodes_controller_test.go b/pkg/operator/controllers/autosizednodes/autosizednodes_controller_test.go index 2055dd8de65..d16c8e259d2 100644 --- a/pkg/operator/controllers/autosizednodes/autosizednodes_controller_test.go +++ b/pkg/operator/controllers/autosizednodes/autosizednodes_controller_test.go @@ -84,8 +84,11 @@ func TestAutosizednodesReconciler(t *testing.T) { Spec: mcv1.KubeletConfigSpec{ AutoSizingReserved: util.BoolToPtr(false), MachineConfigPoolSelector: &metav1.LabelSelector{ - MatchLabels: map[string]string{ - "pools.operator.machineconfiguration.openshift.io/worker": "", + MatchExpressions: []metav1.LabelSelectorRequirement{ + { + Key: "machineconfiguration.openshift.io/mco-built-in", + Operator: metav1.LabelSelectorOpExists, + }, }, }, },