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

feat: add PodDecoration controller #128

Merged
merged 16 commits into from
Dec 28, 2023
Merged

Conversation

Eikykun
Copy link
Collaborator

@Eikykun Eikykun commented Dec 4, 2023

1. Does this PR affect any open issues?(Y/N) and add issue references

2. What is the scope of this PR (e.g. component or file name):

new api apis/apps/v1alpha1/poddecoration_types.go
pkg/controllers/collaset
pkg/controllers/poddecoration
poddecoration webhook

3. Provide a description of the PR(e.g. more details, effects, motivations or doc link):

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Other

4. Are there any breaking changes?(Y/N) and describe the breaking changes(e.g. more details, motivations or doc link):

  • N
  • Y

5. Are there test cases for these changes?(Y/N) select and add more details, references or doc links:

  • Unit test
  • Integration test
  • Benchmark (add benchmark stats below)
  • Manual test (add detailed scripts or steps below)
  • Other

6. Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@Eikykun Eikykun self-assigned this Dec 4, 2023
@Eikykun Eikykun linked an issue Dec 4, 2023 that may be closed by this pull request
Copy link

codecov bot commented Dec 5, 2023

Codecov Report

Attention: 297 lines in your changes are missing coverage. Please review.

Comparison is base (a302b54) 62.02% compared to head (3a8ec6b) 62.21%.

Files Patch % Lines
pkg/controllers/utils/poddecoration/anno.go 27.69% 43 Missing and 4 partials ⚠️
...trollers/poddecoration/poddecoration_controller.go 76.41% 31 Missing and 15 partials ⚠️
pkg/controllers/collaset/utils/poddecoration.go 58.09% 37 Missing and 7 partials ⚠️
.../poddecoration/poddecoration_validating_handler.go 68.59% 32 Missing and 6 partials ⚠️
pkg/controllers/utils/poddecoration/getter.go 59.67% 18 Missing and 7 partials ⚠️
...ic/poddecoration/poddecoration_mutating_handler.go 51.28% 19 Missing ⚠️
pkg/controllers/collaset/collaset_controller.go 68.00% 12 Missing and 4 partials ⚠️
pkg/controllers/collaset/event_handler.go 0.00% 16 Missing ⚠️
pkg/controllers/poddecoration/revision.go 81.39% 6 Missing and 2 partials ⚠️
pkg/controllers/utils/poddecoration/sort.go 46.15% 6 Missing and 1 partial ⚠️
... and 7 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #128      +/-   ##
==========================================
+ Coverage   62.02%   62.21%   +0.18%     
==========================================
  Files          46       70      +24     
  Lines        3573     4570     +997     
==========================================
+ Hits         2216     2843     +627     
- Misses       1140     1449     +309     
- Partials      217      278      +61     
Flag Coverage Δ
unittests 62.21% <62.30%> (+0.18%) ⬆️

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.

@Eikykun Eikykun force-pushed the 231204-dev-pd branch 2 times, most recently from 1ac2135 to 9222fce Compare December 5, 2023 08:36
pkg/controllers/poddecoration/revision.go Outdated Show resolved Hide resolved
pkg/controllers/poddecoration/poddecoration_controller.go Outdated Show resolved Hide resolved
apis/apps/v1alpha1/poddecoration_types.go Show resolved Hide resolved
pkg/controllers/utils/poddecoration/anno.go Outdated Show resolved Hide resolved
pkg/controllers/poddecoration/poddecoration_controller.go Outdated Show resolved Hide resolved
pkg/controllers/poddecoration/poddecoration_controller.go Outdated Show resolved Hide resolved
pkg/controllers/collaset/utils/poddecoration.go Outdated Show resolved Hide resolved
pkg/controllers/utils/poddecoration/sort.go Outdated Show resolved Hide resolved
apis/apps/v1alpha1/poddecoration_types.go Outdated Show resolved Hide resolved
//}
}
for _, revisionPD := range currentGroupPD {
res[revisionPD.Revision] = revisionPD.PD
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think using revision as the key is a little wired.

pkg/controllers/collaset/synccontrol/update.go Outdated Show resolved Hide resolved
pkg/controllers/collaset/synccontrol/update.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@wu8685 wu8685 left a comment

Choose a reason for hiding this comment

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

lgtm

@wu8685 wu8685 merged commit 1cf4fbc into KusionStack:main Dec 28, 2023
7 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Dec 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhancement: Pod additional configuration management supports
2 participants