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

all: support priority and preemption policy transformer #2137

Conversation

saintube
Copy link
Member

@saintube saintube commented Jul 17, 2024

Ⅰ. Describe what this PR does

Support features PriorityTransformer and PreemptionPolicyTransformer:

  • PriorityTransformer: transform the priority value of the pod according to its priority class, allowing us to adapt the pods existing in the cluster that have not set priorities.
  • PreemptionPolicyTransformer: transform the preemption policy of the pod according to a preemption label and the global default policy, allowing us to take over the pods existing in the cluster that may set the default preemptible policy. It helps when the cluster has many kinds of pods set the PreemptLowPriority by default priority classes but we want to enable the preemption only for specific pods.

Ⅱ. Does this pull request fix one issue?

Ⅲ. Describe how to verify it

Ⅳ. Special notes for reviews

V. Checklist

  • I have written necessary docs and comments
  • I have added necessary unit tests and integration tests
  • All checks passed in make test

Copy link

codecov bot commented Jul 17, 2024

Codecov Report

Attention: Patch coverage is 62.26415% with 20 lines in your changes missing coverage. Please review.

Project coverage is 67.86%. Comparing base (4a182a1) to head (710d26e).

Files Patch % Lines
pkg/util/transformer/pod_transformer.go 73.80% 8 Missing and 3 partials ⚠️
pkg/util/transformer/transformers.go 0.00% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2137      +/-   ##
==========================================
- Coverage   67.87%   67.86%   -0.01%     
==========================================
  Files         441      441              
  Lines       41611    41648      +37     
==========================================
+ Hits        28242    28263      +21     
- Misses      10937    10950      +13     
- Partials     2432     2435       +3     
Flag Coverage Δ
unittests 67.86% <62.26%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ZiMengSheng
Copy link
Contributor

/lgtm

@saintube
Copy link
Member Author

/hold

@saintube saintube force-pushed the apis-support-priority-and-preemption-policy-transformer branch from dd47924 to 9bfe86d Compare July 18, 2024 08:41
@koordinator-bot koordinator-bot bot removed the lgtm label Jul 18, 2024
@saintube
Copy link
Member Author

/unhold

Signed-off-by: saintube <saintube@foxmail.com>
@saintube saintube force-pushed the apis-support-priority-and-preemption-policy-transformer branch from 9bfe86d to 710d26e Compare July 22, 2024 08:59
@shaloulcy
Copy link
Contributor

/lgtm

@ZiMengSheng
Copy link
Contributor

/lgtm

@hormes
Copy link
Member

hormes commented Jul 26, 2024

/approve

@koordinator-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hormes

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

@koordinator-bot koordinator-bot bot merged commit 73d873e into koordinator-sh:main Jul 26, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants