Skip to content

feat: add NestedVirtualization to CPUOptions in v1beta1 and v1beta2 APIs (backport release-2.9)#5875

Draft
jhjaggars wants to merge 1 commit intokubernetes-sigs:release-2.9from
jhjaggars:feat/nested-virtualization-backport-2.9
Draft

feat: add NestedVirtualization to CPUOptions in v1beta1 and v1beta2 APIs (backport release-2.9)#5875
jhjaggars wants to merge 1 commit intokubernetes-sigs:release-2.9from
jhjaggars:feat/nested-virtualization-backport-2.9

Conversation

@jhjaggars
Copy link
Contributor

Summary

Backport of #5874 to release-2.9.

  • Add NestedVirtualizationPolicy type and NestedVirtualization field to CPUOptions in api/v1beta2/types.go
  • Add AWSConfidentialComputePolicy, NestedVirtualizationPolicy types and CPUOptions struct as a native field in api/v1beta1/types.go and api/v1beta1/awsmachine_types.go, enabling consumers (e.g. HyperShift) to set CPU options directly via the v1beta1 API without relying on the annotation-based restore pattern
  • Remove manual CPUOptions restore lines from v1beta1 conversion files — auto-generated conversion now handles the field
  • Add NestedVirtualization switch in getInstanceCPUOptionsRequest() mapping to EC2 SDK NestedVirtualizationSpecification
  • Bump github.com/aws/aws-sdk-go-v2/service/ec2 to v1.288.0 for CpuOptionsRequest.NestedVirtualization support
  • Regenerate deepcopy, conversion, and CRD manifests

Test plan

  • make test passes locally
  • make lint passes with 0 issues
  • Verify AWSMachineTemplate with cpuOptions.nestedVirtualization: enabled accepted by v1beta1 webhook

🤖 Generated with Claude Code

@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 23, 2026
@k8s-ci-robot
Copy link
Contributor

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

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 the do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. label Feb 23, 2026
@k8s-ci-robot
Copy link
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 richardcase 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 added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 23, 2026
@k8s-ci-robot
Copy link
Contributor

Hi @jhjaggars. 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.

Backport to release-2.9.

Add CPUOptions struct (ConfidentialCompute + NestedVirtualization) as a
native field in both v1beta1 and v1beta2 AWSMachineSpec and Instance,
enabling HyperShift to set nested virtualization directly via the v1beta1
API without relying on the annotation-based restore pattern.

- Add NestedVirtualizationPolicy type and NestedVirtualization field to
  CPUOptions in api/v1beta2/types.go
- Add AWSConfidentialComputePolicy, NestedVirtualizationPolicy types and
  CPUOptions struct to api/v1beta1/types.go
- Add CPUOptions field to AWSMachineSpec in api/v1beta1/awsmachine_types.go
- Remove manual CPUOptions restore lines from v1beta1 conversion files
  now that CPUOptions is a native v1beta1 field (auto-generated conversion
  handles it)
- Add NestedVirtualization switch in getInstanceCPUOptionsRequest() in
  instances.go, mapping to EC2 SDK NestedVirtualizationSpecification
- Bump github.com/aws/aws-sdk-go-v2/service/ec2 to v1.288.0 for
  CpuOptionsRequest.NestedVirtualization support
- Regenerate deepcopy, conversion, and CRD manifests

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@jhjaggars jhjaggars force-pushed the feat/nested-virtualization-backport-2.9 branch from 1202db9 to 3e8e2e8 Compare February 23, 2026 23:40
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 23, 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/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-priority 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