-
Notifications
You must be signed in to change notification settings - Fork 140
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
support PriorityClass on frontend #53
support PriorityClass on frontend #53
Conversation
/assign @sanposhiho |
In most cases, I think the best way is to wait to create frontend PR until backend PR is merged. But, for this feature, the API for PriorityClass should be exactly the same as the API of other resources, so I think it is okay to develop web frontend before backend PR is merged. |
/label tide/merge-method-squash |
@khalilswdp The PR for backend API was merged. |
@khalilswdp Could you please update the pull request description in the format of this? (like #54) |
fee672c
to
9b5b718
Compare
/kind feature |
Fixes #27 |
@khalilswdp Thanks for updating! 👍 I'll review it later. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice contribution. 👍
I think almost all the changes are okay.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added small comments :)
@@ -0,0 +1,5 @@ | |||
metadata: | |||
name: default-priority-class |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nits:
name: default-priority-class | |
name: priority-class |
name: default-priority-class | ||
value: 1000 | ||
globalDefault: true | ||
description: "Default priority class for all pods" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nits: If my English is strange, please change it to a proper English sentence. (I'm not a native speaker.)
description: "Default priority class for all pods" | |
description: "This is a template priority class for all pods" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not a native english speaker myself, but it look good to me
web/components/ResourceAddButton.vue
Outdated
// if store.count = 0, name suffix is 1. | ||
targetTemplate = priorityclassTemplate((store.count + 1).toString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two Priority classes from the beginning. ("system-cluster-critical" and "system-node-critical")
Kubernetes already ships with two PriorityClasses: system-cluster-critical and system-node-critical. These are common classes and are used to ensure that critical components are always scheduled first.
https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/
// if store.count = 0, name suffix is 1. | |
targetTemplate = priorityclassTemplate((store.count + 1).toString()); | |
// if store.count = 2, name suffix is 1. | |
targetTemplate = priorityclassTemplate((store.count - 1).toString()); |
Hi @sanposhiho I followed the proposed suggestions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I approve this change. Thanks @khalilswdp!
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: khalilswdp, sanposhiho 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 |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Add frontend to consume api for priorityclass from backend.
Which issue(s) this PR fixes:
Related #27
Fixes #27
Special notes for your reviewer:
Just a question, was I supposed to separate PRs by making two separate branches (with separate commits only relevant for PR, like here) or make two branches that might share some code and commits: for example, I leave same previous branch and create a branch on commit where work on backend ended and branch on commit where work on frontend ended and make PRs for both? What are the best practices to follow next time?
This is the front end commits after separating them from branch previous branch (front end won't work since it requires back end changes to be present).
(Answered)
/label tide/merge-method-squash