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

add docs for workloadPriority #1170

Merged
merged 1 commit into from
Oct 10, 2023

Conversation

Gekko0114
Copy link
Member

What type of PR is this?

/kind documentation

What this PR does / why we need it:

add docs for workloadPriority

Which issue(s) this PR fixes:

Fixes #1157

Does this PR introduce a user-facing change?

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/documentation Categorizes issue or PR as related to documentation. labels Oct 1, 2023
@netlify
Copy link

netlify bot commented Oct 1, 2023

Deploy Preview for kubernetes-sigs-kueue ready!

Name Link
🔨 Latest commit 05c2f0f
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/6523e5c76d379100086cd425
😎 Deploy Preview https://deploy-preview-1170--kubernetes-sigs-kueue.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Oct 1, 2023
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Oct 1, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @Gekko0114. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 1, 2023
@Gekko0114
Copy link
Member Author

Gekko0114 commented Oct 1, 2023

Hi @alculquicondor , @tenzen-y ,
Could you review this PR? Thanks,

@Gekko0114
Copy link
Member Author

/assign @alculquicondor
/assign @tenzen-y

Copy link
Member

@tenzen-y tenzen-y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

site/content/en/docs/tasks/_index.md Outdated Show resolved Hide resolved
@tenzen-y
Copy link
Member

tenzen-y commented Oct 3, 2023

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 3, 2023
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 3, 2023
@Gekko0114
Copy link
Member Author

Also, can you add a concept for the WorkloadPriority to https://github.com/kubernetes-sigs/kueue/tree/f6d9f1e7c4efefba1d67825c2b80e73a17840bdf/site/content/en/docs/concepts?

Sure, added a concept.

@@ -103,4 +103,5 @@ creating a corresponding Workload object for it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update the Priority section in this file as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

site/content/en/docs/concepts/workload_priority_class.md Outdated Show resolved Hide resolved
site/content/en/docs/concepts/workload_priority_class.md Outdated Show resolved Hide resolved
site/content/en/docs/concepts/workload_priority_class.md Outdated Show resolved Hide resolved
site/content/en/docs/concepts/workload_priority_class.md Outdated Show resolved Hide resolved
site/content/en/docs/concepts/workload_priority_class.md Outdated Show resolved Hide resolved
site/content/en/docs/concepts/workload_priority_class.md Outdated Show resolved Hide resolved
site/content/en/docs/concepts/workload_priority_class.md Outdated Show resolved Hide resolved
About #1's scenario, the `workloadPriorityClass` is used for the `workload's priority`. On the other hand, the `priorityClass` is used for the `pod's priority`.
About #2's scenario, the `workloadPriorityClass` is used for the `workload's priority`. On the other hand, `workloadPriorityClass` is not used for `pod's priority`.
About #3' scenario, the `PriorityClass` is used for the `workload's priority` and `pod's priority`.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, it would be better to explain what happens if the job implement the JobWithPriorityClass interface.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tenzen-y this might be too developer focused and a user cannot do too much about it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was also concerned about what you say. However, actually, which priorities are used depends on the interface.
For example, we can set three priorities (.spec.runPolicy.priorityClass, .spec.labels.kueue.x-k8s.io/priority-class, and .spec.mpiReplicaSecs[*].template.spec.priorityClassName) on the MPIJob.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or, instead of mentioning the interface, raise MPIJob as a specific case.

@alculquicondor Any better ideas?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your comments! Added the explanation related to JobWithPriorityClass

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like how Hiroyuki phrased it :)

@tenzen-y
Copy link
Member

tenzen-y commented Oct 5, 2023

/assign @trasc

keps/973-workload-priority/README.md Outdated Show resolved Hide resolved
site/content/en/docs/concepts/workload_priority_class.md Outdated Show resolved Hide resolved
About #1's scenario, the `workloadPriorityClass` is used for the `workload's priority`. On the other hand, the `priorityClass` is used for the `pod's priority`.
About #2's scenario, the `workloadPriorityClass` is used for the `workload's priority`. On the other hand, `workloadPriorityClass` is not used for `pod's priority`.
About #3' scenario, the `PriorityClass` is used for the `workload's priority` and `pod's priority`.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tenzen-y this might be too developer focused and a user cannot do too much about it.

site/content/en/docs/tasks/_index.md Outdated Show resolved Hide resolved

## Workload's priority values are always mutable

Workload's `Priority` field is always mutable because it might be useful for the preemption.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this something relevant for a user?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so, I added an example

site/content/en/docs/concepts/workload_priority_class.md Outdated Show resolved Hide resolved
@Gekko0114 Gekko0114 force-pushed the priority_doc branch 4 times, most recently from 8734ffb to 53d961f Compare October 5, 2023 15:26
site/content/en/docs/concepts/_index.md Outdated Show resolved Hide resolved
site/content/en/docs/concepts/_index.md Outdated Show resolved Hide resolved
site/content/en/docs/concepts/_index.md Outdated Show resolved Hide resolved
site/content/en/docs/concepts/workload.md Outdated Show resolved Hide resolved
site/content/en/docs/concepts/workload_priority_class.md Outdated Show resolved Hide resolved
site/content/en/docs/concepts/workload_priority_class.md Outdated Show resolved Hide resolved
@Gekko0114 Gekko0114 force-pushed the priority_doc branch 2 times, most recently from 58dde38 to 6822fd7 Compare October 7, 2023 07:20
Copy link
Member

@tenzen-y tenzen-y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm
leaving /lgtm on @alculquicondor

Copy link
Contributor

@trasc trasc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 9, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 4549ab081455effaaa613e8f0078acc81f21fe52

By default kueue will take the PriorityClassName of the first PodSet having one set,
however the integration of the CRD with Kueue can implement
[`JobWithPriorityClass interface`](https://github.com/kubernetes-sigs/kueue/blob/e162f8508b503d20feb9b31fd0b27d91e58f2c2f/pkg/controller/jobframework/interface.go#L81-L84)
to change this behavior. You can read the code for each job integration
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess that's what we have today :(

If you have the time, please update the documentation for MPIJob and other kubeflow CRDs to explain how we obtain the priority class for each.

Copy link
Contributor

@alculquicondor alculquicondor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alculquicondor, Gekko0114

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 10, 2023
@k8s-ci-robot k8s-ci-robot merged commit 71a2ac5 into kubernetes-sigs:main Oct 10, 2023
3 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v0.5 milestone Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/documentation Categorizes issue or PR as related to documentation. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[doc] add documentation for workloadPriorityClass
5 participants