Changed IsCriticalPod to return true in case of static pods#80491
Conversation
|
/sig scheduling |
|
/retest |
draveness
left a comment
There was a problem hiding this comment.
/priority important-soon
mattjmcnaughton
left a comment
There was a problem hiding this comment.
Thanks for this pr :)
I'm curious to see the results of the test suite after running the two hack scripts below. You may have an import cycle, in which case we may need to rethink the approach slightly. We'll know for sure after re-running the test suite after running the hack scripts.
There was a problem hiding this comment.
Please run ./hack/update-bazel.sh to add this new dependency to the proper BUILD.bazel file.
There was a problem hiding this comment.
I ran the above hack scripts. Doesn't look like it's helping with the import cycle though :(
There was a problem hiding this comment.
Please run ./hack/update-gofmt.sh :)
bsalamat
left a comment
There was a problem hiding this comment.
Looks good. You may have to move IsCriticalPod to pkg/kubelet/pod, or another similar move to remove the circular dependency.
Also, please make sure to add adequate tests to cover the new logic.
Thanks @bsalamat! I made the needed change to remove the import cycle. |
There was a problem hiding this comment.
If you meant to add a static pod, the key should have been ConfigSourceAnnotationKey. What you have used is the deprecated critical annotation key.
|
/test pull-kubernetes-e2e-gce-100-performance |
bsalamat
left a comment
There was a problem hiding this comment.
/lgtm
Please go ahead and squash commits.
Thanks, @hpandeycodeit!
9fdd1c3 to
9e1aa1a
Compare
|
/test pull-kubernetes-e2e-gce-device-plugin-gpu |
bsalamat
left a comment
There was a problem hiding this comment.
/lgtm
/assign @dchen1107
for reviewing and approval
|
I am not necessarily adverse to this. I know I was out of the SIG node meeting where this was discussed as a result of PTO. I am wondering why the static pod author is not able to set priorityClassName on their manifest to system-cluster-critical ? we have been doing this, and i had not seen an issue with that approach. |
@derekwaynecarr They can set priorityClassName in their podspec, but the integer value of the priority will not be resolved by time a static pod goes through admission logic of Kubelet. Please see #80489 for more info. |
9bea463 to
c05d506
Compare
|
@derekwaynecarr We discussed this at SIG Node, and I documented what we discussed at the original issue: #80203 (comment) I believe I also recorded the meeting. Please let me know if you had a second thought on it. Otherwise, I plan to approve the pr. Thanks! |
|
/lgtm Will wait for @derekwaynecarr before giving the final approval. |
|
@bsalamat thanks for the missing detail. /approve |
|
/retest |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dchen1107, derekwaynecarr, hpandeycodeit The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind bug
What this PR does / why we need it:
Currently, If the static pods is critical, the kubelet will not realize it, since it's priority value determines whether the pod is critical or not. So SIG Node decided to consider all static pods as critical regardless of their
PodSpec.PriorityClassName.Which issue(s) this PR fixes:
Fixes #80489
Does this PR introduce a user-facing change?: