Skip to content

✨ feat: add capacity reservation group support#6052

Open
justinmir wants to merge 1 commit into
kubernetes-sigs:mainfrom
justinmir:capacity-reservation-groups
Open

✨ feat: add capacity reservation group support#6052
justinmir wants to merge 1 commit into
kubernetes-sigs:mainfrom
justinmir:capacity-reservation-groups

Conversation

@justinmir

@justinmir justinmir commented Jun 15, 2026

Copy link
Copy Markdown

What type of PR is this?

/kind feature
/kind api-change

What this PR does / why we need it:

Adds support for targeting AWS Capacity Reservation resource groups from CAPA launch paths.

This adds a v1beta2 capacityReservationResourceGroupARN field for AWSMachine and AWSLaunchTemplate, then plumbs it through EC2 instance and launch template request generation. The new target is mutually exclusive with capacityReservationId and follows the existing Spot and CapacityBlock validation rules.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
N/A

Special notes for your reviewer:

This mirrors the existing capacity reservation ID behavior, but sets CapacityReservationResourceGroupArn on the AWS SDK capacity reservation target.

AI Usage:

This PR was developed with assistance from GPT-5.5 with the Opencode Harness.

Checklist:

  • squashed commits
  • includes documentation
  • includes AI generated content
  • includes emoji in title
  • adds unit tests
  • adds or updates e2e tests

Release note:

Added support for targeting AWS Capacity Reservation resource groups from AWSMachine and AWSMachinePool launch templates.

Add v1beta2 fields for targeting capacity reservation resource
group ARNs from AWSMachine and AWSLaunchTemplate.

Plumb the field through EC2 instance and launch template request
generation, conversion restore paths, webhook validation, and generated
CRDs. Keep reservation IDs and resource group ARNs mutually exclusive.

Signed-off-by: Justin Miron <justin.miron@reddit.com>
@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jun 15, 2026
@justinmir justinmir changed the title feat: add capacity reservation group support Non-breaking feature: ✨: add capacity reservation group support Jun 15, 2026
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Jun 15, 2026
@justinmir justinmir changed the title Non-breaking feature: ✨: add capacity reservation group support ✨ feat: add capacity reservation group support Jun 15, 2026
@justinmir justinmir marked this pull request as ready for review June 15, 2026 16:57
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 15, 2026
@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/feature Categorizes issue or PR as related to a new feature. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API and removed release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Jun 15, 2026
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign andidog for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details 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

@k8s-ci-robot k8s-ci-robot requested a review from faiq June 15, 2026 17:04
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jun 15, 2026
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

Hi @justinmir. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/feature Categorizes issue or PR as related to a new feature. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-priority release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants