Repository: kubernetes-sigs/kueue

Issue:
Graduate ManagedJobsNamespaceSelector to GA
This is a very useful feature and I like to discuss what would be needed to graduate this feature to GA.



Hints from issue comments:
@kannon92: /assign

Opened up https://github.com/kubernetes-sigs/kueue/pull/5987.@tenzen-y: @kannon92 @mimowo Will we graduate only ManagedJobsNamespaceSelector to GA in v0.13, and drop ManagedJobsNamespaceSelectorAlwaysRespected in v0.14?

https://github.com/kubernetes-sigs/kueue/blob/f4a78e032c0d116860d7dff15d445952a65e6904/keps/3589-manage-jobs-selectively/kep.yaml#L26-L28@mimowo: I prefer to give users more time to provide feedback before GA-ing ManagedJobsNamespaceSelectorAlwaysRespected, so I would suggest 0.15.@tenzen-y: > I prefer to give users more time to provide feedback before GA-ing ManagedJobsNamespaceSelectorAlwaysRespected, so I would suggest 0.15.

SGTM@kannon92: I see them as different features. And given that we are building upon the OP feature I wanted to see if we should graduate this feature.@tenzen-y: > I see them as different features. And given that we are building upon the OP feature I wanted to see if we should graduate this feature.

IIUC, the ManagedJobsNamespaceSelectorAlwaysRespected was introduced for making migraion period.
So, I'm ok with removing it in the v0.15. If @kannon92 want to keep it for a while, it is also ok for me.


Solution patch:
diff --git a/apis/config/v1beta1/defaults.go b/apis/config/v1beta1/defaults.go
index 84e51bbed..2c7792c8f 100644
--- a/apis/config/v1beta1/defaults.go
+++ b/apis/config/v1beta1/defaults.go
@@ -27,8 +27,6 @@ import (
 	"k8s.io/client-go/tools/leaderelection/resourcelock"
 	configv1alpha1 "k8s.io/component-base/config/v1alpha1"
 	"k8s.io/utils/ptr"
-
-	"sigs.k8s.io/kueue/pkg/features"
 )
 
 const (
@@ -117,20 +115,6 @@ func SetDefaults_Configuration(cfg *Configuration) {
 		MaxCount: DefaultClusterQueuesMaxCount,
 	})
 
-	if !features.Enabled(features.ManagedJobsNamespaceSelector) {
-		// Backwards compatibility: default podOptions.NamespaceSelector if ManagedJobsNamespaceSelector disabled
-		cfg.Integrations.PodOptions = cmp.Or(cfg.Integrations.PodOptions, &PodIntegrationOptions{})
-		cfg.Integrations.PodOptions.NamespaceSelector = cmp.Or(cfg.Integrations.PodOptions.NamespaceSelector, &metav1.LabelSelector{
-			MatchExpressions: []metav1.LabelSelectorRequirement{
-				{
-					Key:      corev1.LabelMetadataName,
-					Operator: metav1.LabelSelectorOpNotIn,
-					Values:   []string{"kube-system", *cfg.Namespace},
-				},
-			},
-		})
-	}
-
 	cfg.ManagedJobsNamespaceSelector = cmp.Or(cfg.ManagedJobsNamespaceSelector, &metav1.LabelSelector{
 		MatchExpressions: []metav1.LabelSelectorRequirement{
 			{
diff --git a/cmd/kueue/main.go b/cmd/kueue/main.go
index 045f6b9c5..64040243c 100644
--- a/cmd/kueue/main.go
+++ b/cmd/kueue/main.go
@@ -364,14 +364,12 @@ func setupControllers(ctx context.Context, mgr ctrl.Manager, cCache *cache.Cache
 	if cfg.Integrations.PodOptions != nil {
 		opts = append(opts, jobframework.WithIntegrationOptions(corev1.SchemeGroupVersion.WithKind("Pod").String(), cfg.Integrations.PodOptions))
 	}
-	if features.Enabled(features.ManagedJobsNamespaceSelector) {
-		nsSelector, err := metav1.LabelSelectorAsSelector(cfg.ManagedJobsNamespaceSelector)
-		if err != nil {
-			setupLog.Error(err, "Failed to parse managedJobsNamespaceSelector")
-			os.Exit(1)
-		}
-		opts = append(opts, jobframework.WithManagedJobsNamespaceSelector(nsSelector))
+	nsSelector, err := metav1.LabelSelectorAsSelector(cfg.ManagedJobsNamespaceSelector)
+	if err != nil {
+		setupLog.Error(err, "Failed to parse managedJobsNamespaceSelector")
+		os.Exit(1)
 	}
+	opts = append(opts, jobframework.WithManagedJobsNamespaceSelector(nsSelector))
 
 	if err := jobframework.SetupControllers(ctx, mgr, setupLog, opts...); err != nil {
 		setupLog.Error(err, "Unable to create controller or webhook", "kubernetesVersion", serverVersionFetcher.GetServerVersion())
diff --git a/pkg/config/validation.go b/pkg/config/validation.go
index 920db6e73..7108b3698 100644
--- a/pkg/config/validation.go
+++ b/pkg/config/validation.go
@@ -241,7 +241,7 @@ func validatePodIntegrationOptions(c *configapi.Configuration) field.ErrorList {
 	// At least one namespace selector must be non-nil and enabled.
 	// It is ok for both to be non-nil; pods will only be managed if all non-nil selectors match
 	hasNamespaceSelector := false
-	if features.Enabled(features.ManagedJobsNamespaceSelector) && c.ManagedJobsNamespaceSelector != nil {
+	if c.ManagedJobsNamespaceSelector != nil {
 		allErrs = validateNamespaceSelectorForPodIntegration(c, c.ManagedJobsNamespaceSelector, managedJobsNamespaceSelectorPath, allErrs)
 		hasNamespaceSelector = true
 	}
@@ -251,11 +251,7 @@ func validatePodIntegrationOptions(c *configapi.Configuration) field.ErrorList {
 	}
 
 	if !hasNamespaceSelector {
-		if features.Enabled(features.ManagedJobsNamespaceSelector) {
-			allErrs = append(allErrs, field.Required(managedJobsNamespaceSelectorPath, "cannot be empty when pod integration is enabled"))
-		} else {
-			allErrs = append(allErrs, field.Required(podOptionsNamespaceSelectorPath, "cannot be empty when pod integration is enabled"))
-		}
+		allErrs = append(allErrs, field.Required(managedJobsNamespaceSelectorPath, "cannot be empty when pod integration is enabled"))
 	}
 
 	return allErrs
@@ -354,14 +350,6 @@ func validateResourceTransformations(c *configapi.Configuration) field.ErrorList
 func validateManagedJobsNamespaceSelector(c *configapi.Configuration) field.ErrorList {
 	var allErrs field.ErrorList
 
-	if !features.Enabled(features.ManagedJobsNamespaceSelector) {
-		return allErrs
-	}
-
-	if c.ManagedJobsNamespaceSelector == nil {
-		return field.ErrorList{field.Required(managedJobsNamespaceSelectorPath, "required when feature gate is enabled")}
-	}
-
 	// The namespace selector must exempt every prohibitedNamespace
 	prohibitedNamespaces := []labels.Set{{corev1.LabelMetadataName: metav1.NamespaceSystem}}
 	if c.Namespace != nil && *c.Namespace != "" {
diff --git a/pkg/controller/jobframework/defaults.go b/pkg/controller/jobframework/defaults.go
index 2a470d5d5..7aa4b5393 100644
--- a/pkg/controller/jobframework/defaults.go
+++ b/pkg/controller/jobframework/defaults.go
@@ -61,7 +61,7 @@ func WorkloadShouldBeSuspended(ctx context.Context, jobObj client.Object, k8sCli
 
 	// Logic for managing jobs without queue names.
 	if manageJobsWithoutQueueName {
-		if features.Enabled(features.ManagedJobsNamespaceSelector) && managedJobsNamespaceSelector != nil {
+		if managedJobsNamespaceSelector != nil {
 			// Default suspend the job if the namespace selector matches
 			ns := corev1.Namespace{}
 			err := k8sClient.Get(ctx, client.ObjectKey{Name: jobObj.GetNamespace()}, &ns)
diff --git a/pkg/controller/jobframework/reconciler.go b/pkg/controller/jobframework/reconciler.go
index 212789226..a48944fc7 100644
--- a/pkg/controller/jobframework/reconciler.go
+++ b/pkg/controller/jobframework/reconciler.go
@@ -367,7 +367,7 @@ func (r *JobReconciler) ReconcileGenericJob(ctx context.Context, req ctrl.Reques
 
 	// when manageJobsWithoutQueueName is enabled, standalone jobs without queue names
 	// are still not managed if they don't match the namespace selector.
-	if features.Enabled(features.ManagedJobsNamespaceSelector) && r.manageJobsWithoutQueueName && QueueName(job) == "" {
+	if r.manageJobsWithoutQueueName && QueueName(job) == "" {
 		ns := corev1.Namespace{}
 		err := r.client.Get(ctx, client.ObjectKey{Name: job.Object().GetNamespace()}, &ns)
 		if err != nil {
diff --git a/pkg/controller/jobs/pod/pod_webhook.go b/pkg/controller/jobs/pod/pod_webhook.go
index 1e1d23693..650e25dfb 100644
--- a/pkg/controller/jobs/pod/pod_webhook.go
+++ b/pkg/controller/jobs/pod/pod_webhook.go
@@ -136,7 +136,7 @@ func (w *PodWebhook) Default(ctx context.Context, obj runtime.Object) error {
 		if err != nil {
 			return fmt.Errorf("failed to get namespace: %w", err)
 		}
-		if features.Enabled(features.ManagedJobsNamespaceSelector) && !w.managedJobsNamespaceSelector.Matches(labels.Set(ns.GetLabels())) {
+		if w.managedJobsNamespaceSelector != nil && !w.managedJobsNamespaceSelector.Matches(labels.Set(ns.GetLabels())) {
 			return nil
 		}
 
diff --git a/pkg/features/kube_features.go b/pkg/features/kube_features.go
index 426596354..c2c820961 100644
--- a/pkg/features/kube_features.go
+++ b/pkg/features/kube_features.go
@@ -218,6 +218,7 @@ var defaultVersionedFeatureGates = map[featuregate.Feature]featuregate.Versioned
 	},
 	ManagedJobsNamespaceSelector: {
 		{Version: version.MustParse("0.10"), Default: true, PreRelease: featuregate.Beta},
+		{Version: version.MustParse("0.13"), Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 0.15
 	},
 	LocalQueueMetrics: {
 		{Version: version.MustParse("0.10"), Default: false, PreRelease: featuregate.Alpha},
diff --git a/site/content/en/docs/installation/_index.md b/site/content/en/docs/installation/_index.md
index b9526fe52..87e783a4c 100644
--- a/site/content/en/docs/installation/_index.md
+++ b/site/content/en/docs/installation/_index.md
@@ -284,7 +284,7 @@ spec:
 | `TopologyAwareScheduling`             | `false` | Alpha | 0.9   |       |
 | `ConfigurableResourceTransformations` | `false` | Alpha | 0.9   | 0.9   |
 | `ConfigurableResourceTransformations` | `true`  | Beta  | 0.10  |       |
-| `ManagedJobsNamespaceSelector`        | `true`  | Beta  | 0.10  |       |
+| `ManagedJobsNamespaceSelector`        | `true`  | Beta  | 0.10  | 0.13  |
 | `LocalQueueDefaulting`                | `false` | Alpha | 0.10  | 0.11  |
 | `LocalQueueDefaulting`                | `true`  | Beta  | 0.12  |       |
 | `LocalQueueMetrics`                   | `false` | Alpha | 0.10  |       |
@@ -298,6 +298,7 @@ spec:
 
 | Feature                           | Default | Stage      | Since | Until |
 | --------------------------------- | ------- | ---------- | ----- | ----- |
+| `ManagedJobsNamespaceSelector`    | `true`  | GA         | 0.13  |       |
 | `QueueVisibility`                 | `false` | Alpha      | 0.4   | 0.9   |
 | `QueueVisibility`                 | `false` | Deprecated | 0.9   |       |
 | `TASProfileMostFreeCapacity`      | `false` | Deprecated | 0.11  | 0.13  |



Test patch:
diff --git a/pkg/config/validation_test.go b/pkg/config/validation_test.go
index cb2e9ebad..9dc13831d 100644
--- a/pkg/config/validation_test.go
+++ b/pkg/config/validation_test.go
@@ -31,7 +31,6 @@ import (
 	"k8s.io/utils/ptr"
 
 	configapi "sigs.k8s.io/kueue/apis/config/v1beta1"
-	"sigs.k8s.io/kueue/pkg/features"
 )
 
 func TestValidate(t *testing.T) {
@@ -68,9 +67,8 @@ func TestValidate(t *testing.T) {
 	}
 
 	testCases := map[string]struct {
-		cfg                    *configapi.Configuration
-		wantErr                field.ErrorList
-		managedJobsFeatureGate bool
+		cfg     *configapi.Configuration
+		wantErr field.ErrorList
 	}{
 		"empty": {
 			cfg: &configapi.Configuration{},
@@ -208,22 +206,6 @@ func TestValidate(t *testing.T) {
 				},
 			},
 		},
-		"nil PodIntegrationOptions and nil managedJobsNamespaceSelector with mjns feature gate disabled": {
-			cfg: &configapi.Configuration{
-				QueueVisibility: defaultQueueVisibility,
-				Integrations: &configapi.Integrations{
-					Frameworks: []string{"pod"},
-					PodOptions: nil,
-				},
-			},
-			managedJobsFeatureGate: false,
-			wantErr: field.ErrorList{
-				&field.Error{
-					Type:  field.ErrorTypeRequired,
-					Field: "integrations.podOptions.namespaceSelector",
-				},
-			},
-		},
 		"nil PodIntegrationOptions and nil managedJobsNamespaceSelector": {
 			cfg: &configapi.Configuration{
 				QueueVisibility: defaultQueueVisibility,
@@ -232,34 +214,11 @@ func TestValidate(t *testing.T) {
 					PodOptions: nil,
 				},
 			},
-			managedJobsFeatureGate: true,
 			wantErr: field.ErrorList{
 				&field.Error{
 					Type:  field.ErrorTypeRequired,
 					Field: "managedJobsNamespaceSelector",
 				},
-				&field.Error{
-					Type:  field.ErrorTypeRequired,
-					Field: "managedJobsNamespaceSelector",
-				},
-			},
-		},
-		"nil PodIntegrationOptions.NamespaceSelector and nil managedJobsNamespaceSelector": {
-			cfg: &configapi.Configuration{
-				QueueVisibility: defaultQueueVisibility,
-				Integrations: &configapi.Integrations{
-					Frameworks: []string{"pod"},
-					PodOptions: &configapi.PodIntegrationOptions{
-						NamespaceSelector: nil,
-					},
-				},
-			},
-			managedJobsFeatureGate: false,
-			wantErr: field.ErrorList{
-				&field.Error{
-					Type:  field.ErrorTypeRequired,
-					Field: "integrations.podOptions.namespaceSelector",
-				},
 			},
 		},
 		"emptyLabelSelector": {
@@ -290,8 +249,7 @@ func TestValidate(t *testing.T) {
 				ManagedJobsNamespaceSelector: systemNamespacesSelector,
 				Integrations:                 defaultIntegrations,
 			},
-			wantErr:                nil,
-			managedJobsFeatureGate: true,
+			wantErr: nil,
 		},
 
 		"prohibited namespace in MatchLabels": {
@@ -331,7 +289,6 @@ func TestValidate(t *testing.T) {
 					Field: "managedJobsNamespaceSelector",
 				},
 			},
-			managedJobsFeatureGate: true,
 		},
 		"prohibited namespace in MatchExpressions with operator In": {
 			cfg: &configapi.Configuration{
@@ -378,7 +335,6 @@ func TestValidate(t *testing.T) {
 					Field: "managedJobsNamespaceSelector",
 				},
 			},
-			managedJobsFeatureGate: true,
 		},
 		"prohibited namespace in MatchExpressions with operator NotIn": {
 			cfg: &configapi.Configuration{
@@ -414,8 +370,7 @@ func TestValidate(t *testing.T) {
 				},
 				Integrations: defaultIntegrations,
 			},
-			wantErr:                nil,
-			managedJobsFeatureGate: true,
+			wantErr: nil,
 		},
 		"no supported waitForPodsReady.requeuingStrategy.timestamp": {
 			cfg: &configapi.Configuration{
@@ -873,7 +828,6 @@ func TestValidate(t *testing.T) {
 
 	for name, tc := range testCases {
 		t.Run(name, func(t *testing.T) {
-			features.SetFeatureGateDuringTest(t, features.ManagedJobsNamespaceSelector, tc.managedJobsFeatureGate)
 			if diff := cmp.Diff(tc.wantErr, validate(tc.cfg, testScheme), cmpopts.IgnoreFields(field.Error{}, "BadValue", "Detail")); diff != "" {
 				t.Errorf("Unexpected returned error (-want,+got):\n%s", diff)
 			}
diff --git a/pkg/controller/jobframework/defaults_test.go b/pkg/controller/jobframework/defaults_test.go
index e9e8b4b4f..1883f7062 100644
--- a/pkg/controller/jobframework/defaults_test.go
+++ b/pkg/controller/jobframework/defaults_test.go
@@ -24,7 +24,6 @@ import (
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	"sigs.k8s.io/controller-runtime/pkg/client"
 
-	"sigs.k8s.io/kueue/pkg/features"
 	utiltesting "sigs.k8s.io/kueue/pkg/util/testing"
 	utiltestingjob "sigs.k8s.io/kueue/pkg/util/testingjobs/job"
 )
@@ -48,31 +47,26 @@ func TestWorkloadShouldBeSuspended(t *testing.T) {
 	cases := map[string]struct {
 		obj                        client.Object
 		manageJobsWithoutQueueName bool
-		featureGateEnabled         bool
 		wantSuspend                bool
 	}{
 		"job with queue name ": {
 			obj:                        utiltestingjob.MakeJob("test-job", managedNamespace.Name).Queue("default").Obj(),
 			manageJobsWithoutQueueName: false,
-			featureGateEnabled:         true,
 			wantSuspend:                true,
 		},
 		"job with queue name manageJobs": {
 			obj:                        utiltestingjob.MakeJob("test-job", managedNamespace.Name).Queue("default").Obj(),
 			manageJobsWithoutQueueName: true,
-			featureGateEnabled:         true,
 			wantSuspend:                true,
 		},
 		"job without queue name": {
 			obj:                        utiltestingjob.MakeJob("test-job", managedNamespace.Name).Obj(),
 			manageJobsWithoutQueueName: false,
-			featureGateEnabled:         true,
 			wantSuspend:                false,
 		},
 		"job without queue name with manageJobs": {
 			obj:                        utiltestingjob.MakeJob("test-job", managedNamespace.Name).Obj(),
 			manageJobsWithoutQueueName: true,
-			featureGateEnabled:         true,
 			wantSuspend:                true,
 		},
 		"job without queue name but with managed parent with manageJobs": {
@@ -80,27 +74,18 @@ func TestWorkloadShouldBeSuspended(t *testing.T) {
 				OwnerReference(parent.Name, batchv1.SchemeGroupVersion.WithKind("Job")).
 				Obj(),
 			manageJobsWithoutQueueName: true,
-			featureGateEnabled:         true,
 			wantSuspend:                false,
 		},
 		"job without queue name with manageJobs with feature disabled": {
 			obj:                        utiltestingjob.MakeJob("test-job", managedNamespace.Name).Obj(),
 			manageJobsWithoutQueueName: true,
-			featureGateEnabled:         false,
 			wantSuspend:                true,
 		},
 		"job without queue name with manageJobs in unmanaged ns": {
 			obj:                        utiltestingjob.MakeJob("test-job", unmanagedNamespace.Name).Obj(),
 			manageJobsWithoutQueueName: true,
-			featureGateEnabled:         true,
 			wantSuspend:                false,
 		},
-		"job without queue name with manageJobs in unmanaged ns with feature disabled": {
-			obj:                        utiltestingjob.MakeJob("test-job", unmanagedNamespace.Name).Obj(),
-			manageJobsWithoutQueueName: true,
-			featureGateEnabled:         false,
-			wantSuspend:                true,
-		},
 	}
 
 	for tcName, tc := range cases {
@@ -110,7 +95,6 @@ func TestWorkloadShouldBeSuspended(t *testing.T) {
 			client := builder.Build()
 			ctx, _ := utiltesting.ContextWithLog(t)
 
-			features.SetFeatureGateDuringTest(t, features.ManagedJobsNamespaceSelector, tc.featureGateEnabled)
 			suspend, err := WorkloadShouldBeSuspended(ctx, tc.obj, client, tc.manageJobsWithoutQueueName, namespaceSelector)
 			if err != nil {
 				t.Errorf("Got error: %v", err)
diff --git a/pkg/controller/jobs/pod/pod_webhook_test.go b/pkg/controller/jobs/pod/pod_webhook_test.go
index 5ab93a9c5..3645a4df0 100644
--- a/pkg/controller/jobs/pod/pod_webhook_test.go
+++ b/pkg/controller/jobs/pod/pod_webhook_test.go
@@ -83,8 +83,7 @@ func TestDefault(t *testing.T) {
 	}
 
 	testCases := map[string]struct {
-		enableTopologyAwareScheduling      bool
-		enableManagedJobsNamespaceSelector bool
+		enableTopologyAwareScheduling bool
 
 		initObjects                  []client.Object
 		pod                          *corev1.Pod
@@ -432,9 +431,8 @@ func TestDefault(t *testing.T) {
 				Obj(),
 		},
 		"ManagedJobsNamespaceSelector is enabled and the namespace matches the selector": {
-			enableManagedJobsNamespaceSelector: true,
-			initObjects:                        []client.Object{defaultNamespace},
-			managedJobsNamespaceSelector:       defaultManagedJobsNamespaceSelector,
+			initObjects:                  []client.Object{defaultNamespace},
+			managedJobsNamespaceSelector: defaultManagedJobsNamespaceSelector,
 			pod: testingpod.MakePod("test-pod", defaultNamespace.Name).
 				Queue("queue").
 				Obj(),
@@ -446,7 +444,6 @@ func TestDefault(t *testing.T) {
 				Obj(),
 		},
 		"ManagedJobsNamespaceSelector is enabled but doesn’t match the managedJobsNamespaceSelector": {
-			enableManagedJobsNamespaceSelector: true,
 			initObjects: []client.Object{
 				utiltesting.MakeNamespaceWrapper("kube-system").Label(corev1.LabelMetadataName, "kube-system").Obj(),
 			},
@@ -515,7 +512,6 @@ func TestDefault(t *testing.T) {
 	for name, tc := range testCases {
 		t.Run(name, func(t *testing.T) {
 			features.SetFeatureGateDuringTest(t, features.TopologyAwareScheduling, tc.enableTopologyAwareScheduling)
-			features.SetFeatureGateDuringTest(t, features.ManagedJobsNamespaceSelector, tc.enableManagedJobsNamespaceSelector)
 			features.SetFeatureGateDuringTest(t, features.LocalQueueDefaulting, tc.localQueueDefaulting)
 			t.Cleanup(jobframework.EnableIntegrationsForTest(t, tc.enableIntegrations...))
 			builder := utiltesting.NewClientBuilder(rayv1.AddToScheme, kfmpi.AddToScheme, kftraining.AddToScheme, appsv1.AddToScheme)
diff --git a/pkg/controller/jobs/raycluster/raycluster_webhook_test.go b/pkg/controller/jobs/raycluster/raycluster_webhook_test.go
index 4edac8f1d..77f97cc84 100644
--- a/pkg/controller/jobs/raycluster/raycluster_webhook_test.go
+++ b/pkg/controller/jobs/raycluster/raycluster_webhook_test.go
@@ -100,7 +100,6 @@ func TestValidateDefault(t *testing.T) {
 
 	for name, tc := range testcases {
 		t.Run(name, func(t *testing.T) {
-			features.SetFeatureGateDuringTest(t, features.ManagedJobsNamespaceSelector, false)
 			features.SetFeatureGateDuringTest(t, features.LocalQueueDefaulting, tc.localQueueDefaulting)
 			ctx, _ := utiltesting.ContextWithLog(t)
 			builder := utiltesting.NewClientBuilder()
diff --git a/pkg/controller/jobs/rayjob/rayjob_webhook_test.go b/pkg/controller/jobs/rayjob/rayjob_webhook_test.go
index 42ca93151..eccfee4ab 100644
--- a/pkg/controller/jobs/rayjob/rayjob_webhook_test.go
+++ b/pkg/controller/jobs/rayjob/rayjob_webhook_test.go
@@ -100,7 +100,6 @@ func TestDefault(t *testing.T) {
 
 	for name, tc := range testcases {
 		t.Run(name, func(t *testing.T) {
-			features.SetFeatureGateDuringTest(t, features.ManagedJobsNamespaceSelector, false)
 			features.SetFeatureGateDuringTest(t, features.LocalQueueDefaulting, tc.localQueueDefaulting)
 			ctx, _ := utiltesting.ContextWithLog(t)
 			builder := utiltesting.NewClientBuilder()