Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[YUNIKORN-2049] Fix incorrect placement rule examples #691

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions deployments/examples/placements/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
5 changes: 2 additions & 3 deletions deployments/examples/placements/fixed/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -27,4 +27,3 @@ queue.yaml: |
submitacl: '*'
queues:
- name: last_resort

6 changes: 3 additions & 3 deletions deployments/examples/placements/fixed/fixed_example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -34,4 +35,3 @@ spec:
requests:
cpu: "100m"
memory: "500M"

5 changes: 2 additions & 3 deletions deployments/examples/placements/provided/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -28,4 +28,3 @@ queue.yaml: |
queues:
- name: root
submitacl: '*'

Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -34,4 +35,3 @@ spec:
requests:
cpu: "100m"
memory: "500M"

5 changes: 2 additions & 3 deletions deployments/examples/placements/tag/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -26,4 +26,3 @@ queue.yaml: |
queues:
- name: root
submitacl: '*'

11 changes: 6 additions & 5 deletions deployments/examples/placements/tag/tag_example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -53,4 +55,3 @@ spec:
requests:
cpu: "100m"
memory: "500M"

5 changes: 2 additions & 3 deletions deployments/examples/placements/username/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -27,4 +27,3 @@ queue.yaml: |
submitacl: '*'
queues:
- name: finance_dot_test

Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -52,4 +54,3 @@ spec:
requests:
cpu: "100m"
memory: "500M"