This is an automated email from the ASF dual-hosted git repository.
wilfreds pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/yunikorn-k8shim.git
The following commit(s) were added to refs/heads/master by this push:
new e05f48bb [YUNIKORN-2049] Fix incorrect placement rule examples (#691)
e05f48bb is described below
commit e05f48bb0d3855fe8842d20549324ab7561ae7d5
Author: brandboat <[email protected]>
AuthorDate: Thu Oct 26 13:40:10 2023 +1100
[YUNIKORN-2049] Fix incorrect placement rule examples (#691)
Closes: #691
Signed-off-by: Wilfred Spiegelenburg <[email protected]>
---
deployments/examples/placements/README.md | 10 +++++-----
deployments/examples/placements/fixed/config.yaml | 5 ++---
deployments/examples/placements/fixed/fixed_example.yaml | 6 +++---
deployments/examples/placements/provided/config.yaml | 5 ++---
.../examples/placements/provided/provided_example.yaml | 4 ++--
deployments/examples/placements/tag/config.yaml | 5 ++---
deployments/examples/placements/tag/tag_example.yaml | 11 ++++++-----
deployments/examples/placements/username/config.yaml | 5 ++---
.../examples/placements/username/username_example.yaml | 7 ++++---
9 files changed, 28 insertions(+), 30 deletions(-)
diff --git a/deployments/examples/placements/README.md
b/deployments/examples/placements/README.md
index 1737973f..45b041f4 100644
--- a/deployments/examples/placements/README.md
+++ b/deployments/examples/placements/README.md
@@ -28,12 +28,12 @@ The sleep pod is described in the example file and the
partition is provided in
## How to adopt the queues in `config.yaml`
Before deploying the pods, make sure that the data in the `yunikorn-configs`
configmap is correct.
-For example, `queue.yaml` in the `yunikorn-configs` configmap should be
updated before starting fixed example.
+For example, `queues.yaml` in the `yunikorn-configs` configmap should be
updated before starting fixed example.
`yunikorn-configs` configmap should contains following information.
----
-**_NOTE:_**
-`queue.yaml` should be __full__ queue config and then legal configuration
would be updated to Yunikorn.
----
+
+> **_NOTE:_**
+> `queues.yaml` should be __full__ queue config and then legal configuration
would be updated to Yunikorn.
+
```
yunikornDefaults:
queues.yaml: |
diff --git a/deployments/examples/placements/fixed/config.yaml
b/deployments/examples/placements/fixed/config.yaml
index 84eb19a8..bff93431 100644
--- a/deployments/examples/placements/fixed/config.yaml
+++ b/deployments/examples/placements/fixed/config.yaml
@@ -15,8 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-# Update this queue yaml to the yunikorn-configs configmap before trying this
example.
-queue.yaml: |
+# Update the queues.yaml to the yunikorn-configs configmap before trying this
example.
+queues.yaml: |
partitions:
- name: default
placementrules:
@@ -27,4 +27,3 @@ queue.yaml: |
submitacl: '*'
queues:
- name: last_resort
-
diff --git a/deployments/examples/placements/fixed/fixed_example.yaml
b/deployments/examples/placements/fixed/fixed_example.yaml
index 633ea297..e6aa2f65 100644
--- a/deployments/examples/placements/fixed/fixed_example.yaml
+++ b/deployments/examples/placements/fixed/fixed_example.yaml
@@ -20,9 +20,10 @@ kind: Pod
metadata:
labels:
app: sleep
- applicationId: "prvoided-rule-example01"
+ applicationId: "fixed-rule-example01"
queue: "my_special_queue"
- yunikorn.apache.org/username: developer
+ annotations:
+ yunikorn.apache.org/user.info: "{\"user\": \"developer\"}"
name: task0
spec:
schedulerName: yunikorn
@@ -34,4 +35,3 @@ spec:
requests:
cpu: "100m"
memory: "500M"
-
diff --git a/deployments/examples/placements/provided/config.yaml
b/deployments/examples/placements/provided/config.yaml
index 6fb1b62a..b4301fdb 100644
--- a/deployments/examples/placements/provided/config.yaml
+++ b/deployments/examples/placements/provided/config.yaml
@@ -15,8 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-# Update this queue yaml to the yunikorn-configs configmap before trying this
example.
-queue.yaml: |
+# Update the queues.yaml to the yunikorn-configs configmap before trying this
example.
+queues.yaml: |
partitions:
- name: default
placementrules:
@@ -28,4 +28,3 @@ queue.yaml: |
queues:
- name: root
submitacl: '*'
-
diff --git a/deployments/examples/placements/provided/provided_example.yaml
b/deployments/examples/placements/provided/provided_example.yaml
index 0b78bb50..8bc35076 100644
--- a/deployments/examples/placements/provided/provided_example.yaml
+++ b/deployments/examples/placements/provided/provided_example.yaml
@@ -22,7 +22,8 @@ metadata:
app: sleep
applicationId: "prvoided-rule-example01"
queue: "my_special_queue"
- yunikorn.apache.org/username: "developer"
+ annotations:
+ yunikorn.apache.org/user.info: "{\"user\": \"developer\"}"
name: task0
spec:
schedulerName: yunikorn
@@ -34,4 +35,3 @@ spec:
requests:
cpu: "100m"
memory: "500M"
-
diff --git a/deployments/examples/placements/tag/config.yaml
b/deployments/examples/placements/tag/config.yaml
index 9321620c..8cec35d4 100644
--- a/deployments/examples/placements/tag/config.yaml
+++ b/deployments/examples/placements/tag/config.yaml
@@ -15,8 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-# Update this queue yaml to the yunikorn-configs configmap before trying this
example.
-queue.yaml: |
+# Update the queues.yaml to the yunikorn-configs configmap before trying this
example.
+queues.yaml: |
partitions:
- name: default
placementrules:
@@ -26,4 +26,3 @@ queue.yaml: |
queues:
- name: root
submitacl: '*'
-
diff --git a/deployments/examples/placements/tag/tag_example.yaml
b/deployments/examples/placements/tag/tag_example.yaml
index b0296f01..e39bd04c 100644
--- a/deployments/examples/placements/tag/tag_example.yaml
+++ b/deployments/examples/placements/tag/tag_example.yaml
@@ -20,8 +20,9 @@ kind: Pod
metadata:
labels:
app: sleep
- applicationId: "prvoided-rule-example01"
- yunikorn.apache.org/username: developer
+ applicationId: "tag-rule-example01"
+ annotations:
+ yunikorn.apache.org/user.info: "{\"user\": \"developer\"}"
name: task0
spec:
schedulerName: yunikorn
@@ -40,8 +41,9 @@ metadata:
namespace: testing
labels:
app: sleep
- applicationId: "prvoided-rule-example02"
- yunikorn.apache.org/username: developer
+ applicationId: "tag-rule-example02"
+ annotations:
+ yunikorn.apache.org/user.info: "{\"user\": \"developer\"}"
name: task1
spec:
schedulerName: yunikorn
@@ -53,4 +55,3 @@ spec:
requests:
cpu: "100m"
memory: "500M"
-
diff --git a/deployments/examples/placements/username/config.yaml
b/deployments/examples/placements/username/config.yaml
index d4b3b770..de629ae4 100644
--- a/deployments/examples/placements/username/config.yaml
+++ b/deployments/examples/placements/username/config.yaml
@@ -15,8 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-# Update this queue yaml to the yunikorn-configs configmap before trying this
example.
-queue.yaml: |
+# Update the queues.yaml to the yunikorn-configs configmap before trying this
example.
+queues.yaml: |
partitions:
- name: default
placementrules:
@@ -27,4 +27,3 @@ queue.yaml: |
submitacl: '*'
queues:
- name: finance_dot_test
-
diff --git a/deployments/examples/placements/username/username_example.yaml
b/deployments/examples/placements/username/username_example.yaml
index 20c50ddb..0ae675fb 100644
--- a/deployments/examples/placements/username/username_example.yaml
+++ b/deployments/examples/placements/username/username_example.yaml
@@ -21,7 +21,8 @@ metadata:
labels:
app: sleep
applicationId: "username-rule-example01"
- yunikorn.apache.org/username: finance.test
+ annotations:
+ yunikorn.apache.org/user.info: "{\"user\": \"finance.test\"}"
name: task0
spec:
schedulerName: yunikorn
@@ -40,7 +41,8 @@ metadata:
labels:
app: sleep
applicationId: "username-rule-example02"
- yunikorn.apache.org/username: developer
+ annotations:
+ yunikorn.apache.org/user.info: "{\"user\": \"developer\"}"
name: task1
spec:
schedulerName: yunikorn
@@ -52,4 +54,3 @@ spec:
requests:
cpu: "100m"
memory: "500M"
-
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]