-
Notifications
You must be signed in to change notification settings - Fork 121
✨ Implement FromPoolAnnotation
#2902
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
base: main
Are you sure you want to change the base?
Conversation
|
Skipping CI for Draft Pull Request. |
d39b1d2 to
6a56bce
Compare
fddb510 to
45a3075
Compare
kashifest
left a comment
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.
Thanks a lot @s3rj1k. Overall lgtm.
One minor comment. There's some core logic changes in the PR, such as the addFromAnnotation and getReferencedPools functions (which handle the extraction and processing of pool references from annotations at a lower level), do not appear to have direct unit test coverage in this PR. Would you please add a few more unit tests to cover those changes?
Signed-off-by: s3rj1k <[email protected]>
45a3075 to
ff5964a
Compare
Signed-off-by: s3rj1k <[email protected]>
Thanks for review, hopefully this will handle requested changes |
|
I feel we need everyone to check this, quite a big change |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kashifest 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 |
|
/test metal3-centos-e2e-integration-test-main metal3-ubuntu-e2e-integration-test-main |
Success! |
| // a Machine, Metal3Machine, or BareMetalHost object. | ||
| // When set, FromIPPool and FromPoolRef are ignored. | ||
| // +optional | ||
| FromPoolAnnotation *FromPoolAnnotation `json:"fromPoolAnnotation,omitempty"` |
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.
Why are we allowing this to be set on any of the object?
why not just one, maybe just m3m?
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.
Few points:
- github.com/Add
fromPoolAnnotationfield for IPPool reference via annotation metal3-docs#571 this was explicitly showing a usecase where you would use BMH - CAPM3 has other fromAnnotation features and they support all 3 objects
- as a consumer I want to have flexibility on what object I put this annotations, I don't want to be gated out on features
- as a consumer I create BMH, not m3m, I want all configs be in object that I create and don't want to be forced to ad-hoc update some ohter object that gets created during life-cycle of the cluster
What is the real concern here?
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.
You’re right it works the same way for other fromAnnotation features. But since you’re not introducing that change, lgtm from my side on this PR.
In my opinion probably just bmh is fine, my concern is with the getValueFromAnnotation function, it currently prioritizes m3m and ignores other annotations. I dont think this is documented properly. I will check that.
/lgtm
cc @lentzi90 please check.
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 guessing that idea was something like, if we have some specific annotation managed in CAPM3 in future we would put that annotation on m3machine and let's ensure that this is what will be used, this kind of makes sense and I agree this should be documented if not already.
Sunnatillo
left a comment
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.
LGTM
Great work @s3rj1k. Thank you.
Is it possible for you to add documentation about how to use this feature in metal3 book?
We already have this metal3-io/metal3-docs@e6c0eac Just needs to be updated, remove development part. |
|
@kashifest @Rozzii are we ready to land this? |
Implements: metal3-io/metal3-docs#571