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

koord-manager: support resource amplification config, cpu, memory and other resource #2172

Merged
merged 1 commit into from
Sep 2, 2024

Conversation

yangfeiyu20102011
Copy link
Contributor

@yangfeiyu20102011 yangfeiyu20102011 commented Aug 19, 2024

Ⅰ. Describe what this PR does

Support resource amplification config, cpu and memory.

amplification-config: |
    {
      "enable": false,
      "nodeConfigs": [
        {
          "name": "selector-test",
          "nodeSelector": {
              "matchLabels": {
                "node.koordinator.sh/cpunormalization": "true"
              }
          },
          "resourceAmplificationRatio": {
            "cpu": 1.5,
            "memory": 1.6
          },
          "enable": true
        }
    ]
  }

cpuAmplificationRatio = amplificationStrategy.CPURatio * CPUNormalizationRatio
memoryAmplificationRatio = amplificationStrategy.MemoryRatio

Ⅱ. 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

@yangfeiyu20102011
Copy link
Contributor Author

PTAL, thanks. @saintube @jasonliu747 @FillZpp

Copy link

codecov bot commented Aug 19, 2024

Codecov Report

Attention: Patch coverage is 75.38462% with 32 lines in your changes missing coverage. Please review.

Project coverage is 67.88%. Comparing base (65bfe26) to head (4d81aa4).
Report is 12 commits behind head on main.

Files with missing lines Patch % Lines
...s/resourceamplification/configmap_event_handler.go 71.91% 22 Missing and 3 partials ⚠️
...deresource/plugins/resourceamplification/plugin.go 82.92% 6 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2172      +/-   ##
==========================================
- Coverage   67.88%   67.88%   -0.01%     
==========================================
  Files         443      444       +1     
  Lines       41921    42089     +168     
==========================================
+ Hits        28460    28574     +114     
- Misses      11006    11055      +49     
- Partials     2455     2460       +5     
Flag Coverage Δ
unittests 67.88% <75.38%> (-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.

@yangfeiyu20102011 yangfeiyu20102011 force-pushed the my-dev branch 2 times, most recently from 533f959 to c1b2e57 Compare August 22, 2024 07:31
@yangfeiyu20102011
Copy link
Contributor Author

All is resolved, thanks. cc @saintube @zqzten

@yangfeiyu20102011 yangfeiyu20102011 changed the title koord-manager: support resource amplification config, cpu and memory koord-manager: support resource amplification config, cpu, memory and other resource Aug 22, 2024
… other resource

Signed-off-by: yangfeiyu20102011 <yangfeiyu20102011@163.com>
Copy link
Member

@zqzten zqzten left a comment

Choose a reason for hiding this comment

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

Thanks!
/lgtm

@saintube saintube added the lgtm label Aug 27, 2024
Copy link
Member

@saintube saintube left a comment

Choose a reason for hiding this comment

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

/lgtm

@koordinator-bot koordinator-bot bot removed the lgtm label Aug 28, 2024
Copy link
Member

@saintube saintube left a comment

Choose a reason for hiding this comment

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

/lgtm

@koordinator-bot koordinator-bot bot added the lgtm label Aug 28, 2024
@koordinator-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hormes, saintube, zqzten

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 6c740d0 into koordinator-sh:main Sep 2, 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