-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add capacity reservation to spec #5462
Conversation
Anyone knows how to update the docs for the config reference? |
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 👍🏻
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.
A couple of comments/change requests! :)
We could also add validation that CapacityReservationPreference
is set to a valid value, which is either open
or none
, and add a note about this in the schema.
pkg/apis/eksctl.io/v1alpha5/types.go
Outdated
|
||
// CapacityReservationTarget defines reservation target details | ||
type CapacityReservationTarget struct { | ||
CapacityReservationID *string `json:"capacityReservationId,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.
CapacityReservationID *string `json:"capacityReservationId,omitempty"` | |
CapacityReservationID *string `json:"capacityReservationID,omitempty"` |
shouldn't this be uppercase ID
?
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.
Sure. :D Adjust the tests too :)
CapacityReservationId: valueOrNil(mng.CapacityReservation.CapacityReservationTarget.CapacityReservationID), | ||
CapacityReservationResourceGroupArn: valueOrNil(mng.CapacityReservation.CapacityReservationTarget.CapacityReservationResourceGroupARN), |
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.
The CapacityReservationSpecification docs specify that:
You can specify only one parameter at a time. If you specify CapacityReservationPreference and CapacityReservationTarget, the request fails.
We should add validation that not both are set at the same time.
Stale review because I'm applying the changes and will require a review from someone else.
I tried creating it manually with just
I will add more validation to split it further since those 2 fields also cannot be set at the same time. |
@nikimanoledaki The original ticket was just about adding the support for CapacityReservationID, I think we should just stick to that and not go overboard with other settings. If we get more requests in the future we'll see how to add support for them. Sounds good?
|
I don't think she added anything new right now, right? She just improved the UX by returning an error if the fields are defined together. ARN was already there. Thanks, Niki, great work! :) Thanks for shepherding my little baby. :D |
@Himangini The change was simple: adding 1 more validation and updating the tests. I just finished it and pushed the changes. Regarding scope, the feature request was to add support for Capacity Reservations. This is what this PR does, including Preference, ID, and Resource Group. IDs are part of the Target, and I think (and I agree with Gergely) that it would not be a complete feature if we did not add Preference and Resource Group as well - it's 2 more fields of the same CloudFormation struct. |
Thats awesome, thanks for that.
With my earlier comment, I was saying I don't think we talked about adding support for ARN during planning, I am guessing this PR is adding extra bits as mentioned in the quote below and all I was saying was if it's creating more problems let's skip the ARN support.
|
@Himangini Thank you for raising the question regarding scope. Thankfully the extra bits only took some validation to make this feature complete and this PR is ready to be reviewed 👍 |
Manually tested that it works:
|
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.
👍🏻
Hi @Himangini , couldn't find the said field at the online page. Can you provide the link to the screenshot you captured? Would like to understand if this new feature applies to both node group and managed node group? Thanks. |
Hello @tanvp112! Yes, it applies to both, managed and unmanaged. The website will not have it yet, as this was just released recently in an RC. :) Please wait for a full release for the docs update. :) |
Description
Closes #5258
Note, that this adds a bit more than just the ID to be more flexible and preempt future requests of "just add the ARN"... :)
Checklist
README.md
, or theuserdocs
directory)area/nodegroup
) and kind (e.g.kind/improvement
)BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯