You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@yunikorn.apache.org by GitBox <gi...@apache.org> on 2020/09/22 13:26:17 UTC

[GitHub] [incubator-yunikorn-site] adamantal commented on a change in pull request #19: [YUNIKORN-398] Document namespace based tags

adamantal commented on a change in pull request #19:
URL: https://github.com/apache/incubator-yunikorn-site/pull/19#discussion_r492731293



##########
File path: docs/user_guide/resource_quota_mgmt.md
##########
@@ -150,3 +150,38 @@ Jobs continue to be submitted to namespaces, based on the `Placementrule` used
 in the configuration. YuniKorn will automatically run the job and all its pods in
 the corresponding queue. For example, if a job is submitted to namespace `development`,
 then you will see the job is running in `root.development` queue.
+
+## Option 3) Custom mapping of workspaces to queues using Kubernetes shim
+
+You can configure the following annotation for a Kubernetes namespace in your cluster: `yunikorn.apache.org/parentqueue`.
+Each pod (allocation) created in the namespace will be passed to the scheduler with the value of that annotation under the `namespace.parentqueue` tag.
+
+### Example: Creating dynamic leaf queues based on namespaces
+
+Cluster administrators can use this behaviour to put allocations in dedicated queues based on the namespace's annotations.
+
+Let's say we have the following queue configuration:
+```yaml
+placementrules:
+ - name: user
+   create: true
+   parent:
+     - name: tag
+       value: namespace
+       create: true
+       parent:
+         - name: tag
+           value: namespace.parentqueue
+queues:
+ - name: root
+   queues:
+     - name: namespaces
+```
+and the `production` namespace is annotated with the following annotation:
+```yaml
+yunikorn.apache.org/parentqueue: root.namespaces
+```
+
+Admins can put each application into different user's queue based on the namespace setting using the settings above.
+
+Let's say user `bob` submitting an application to the `production` namespace. The application will be placed onto `root.namespaces.production.bob`.

Review comment:
       Actually you don't need to annotate the namespace if you want to achieve that.
   By changing the queue hierarchy to produce a config which produces the `root.production.bob` as an answer, you don't use the annotation on the namespace at all.
   
   I simplified the example a bit, but we do need that layer - that is what this whole example is about.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org