1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/kueue-label-namespaces.adoc
2025-10-01 17:34:03 +00:00

30 lines
1.2 KiB
Plaintext

// Module included in the following assemblies:
//
// * ai_workloads/kueue/install-kueue.adoc
// * ai_workloads/kueue/install-disconnected.adoc
:_mod-docs-content-type: PROCEDURE
[id="label-namespaces_{context}"]
= Labeling namespaces to allow {kueue-name} to manage jobs
The {kueue-name} Operator uses an opt-in webhook mechanism to ensure that policies are only enforced for the jobs and namespaces that it is expected to target.
You must label the namespaces where you want {kueue-name} to manage jobs with the `kueue.openshift.io/managed=true` label.
.Prerequisites
* You have cluster administrator permissions.
* The {kueue-name} Operator is installed on your cluster, and you have created a `Kueue` custom resource (CR).
* You have installed the {oc-first}.
.Procedure
* Add the `kueue.openshift.io/managed=true` label to a namespace by running the following command:
+
[source,terminal]
----
$ oc label namespace <namespace> kueue.openshift.io/managed=true
----
When you add this label, you instruct the {kueue-name} Operator that the namespace is managed by its webhook admission controllers. As a result, any {kueue-name} resources within that namespace are properly validated and mutated.