Skip to content

Conversation

fangge1212
Copy link
Contributor

@fangge1212 fangge1212 commented Jul 28, 2025

AMD SEV-SNP is one of the confidential computing technologies. This commit adds support for AMD SEV-SNP on AWS, so users can utilize the confidential computing on the cluster nodes.

Upstream CAPA PR: kubernetes-sigs/cluster-api-provider-aws#5605

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 28, 2025

Hello @fangge1212! Some important instructions when contributing to openshift/api:
API design plays an important part in the user experience of OpenShift and as such API PRs are subject to a high level of scrutiny to ensure they follow our best practices. If you haven't already done so, please review the OpenShift API Conventions and ensure that your proposed changes are compliant. Following these conventions will help expedite the api review process for your PR.

@openshift-ci openshift-ci bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 28, 2025
@openshift-ci openshift-ci bot requested review from everettraven and mandre July 28, 2025 08:53
@fangge1212 fangge1212 force-pushed the aws_amd_sev_snp branch 2 times, most recently from 1271931 to a6478c1 Compare July 29, 2025 08:18
@fangge1212 fangge1212 force-pushed the aws_amd_sev_snp branch 3 times, most recently from 82e877d to 1df992a Compare August 6, 2025 22:44
// instanceType is the type of instance to create. Example: m4.xlarge
InstanceType string `json:"instanceType"`
// cpuOptions is the set of cpu options for the instance.
// +optional
Copy link
Contributor

Choose a reason for hiding this comment

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

What happens if this field is not specified by a user?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If unset, no CPU options are passed to the AWS platform and AWS default values are used.

Copy link
Contributor

Choose a reason for hiding this comment

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

Do we know what the default values are currently on AWS?

Copy link
Contributor

Choose a reason for hiding this comment

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

Even if we don't have concrete defaults we can point to, it would be nice to include guidance on how an end-user could identify what the defaults for their configuration would be.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The CpuOptions in AWS consists of three fields:

In this PR, only amdSevSnp is exposed to users. I'm not entirely sure how best to describe this in the API documentation — should we include a link to the AWS documentation?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added the link to AWS website

@fangge1212 fangge1212 force-pushed the aws_amd_sev_snp branch 5 times, most recently from bbef962 to e48669f Compare August 8, 2025 06:42
@fangge1212
Copy link
Contributor Author

/retest-required

@fangge1212
Copy link
Contributor Author

/retest

@fangge1212 fangge1212 force-pushed the aws_amd_sev_snp branch 3 times, most recently from f28b17a to 520141d Compare August 12, 2025 11:09
Comment on lines 20 to 21
// cpuOptions defines CPU-related settings for the instance, including the confidential computing policy.
// If unset, no CPU options will be passed to the AWS platform and AWS default CPU options will be applied.
Copy link
Contributor

Choose a reason for hiding this comment

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

How do I know what the "AWS default CPU options" that will be applied are? Are these literally defaults AWS imposes on requests that don't specify these options, or are these defaulted elsewhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the comment! To clarify: OpenShift does not set defaults for cpuOptions. If the field is unset, the RunInstances request is sent without a CpuOptions block, and AWS applies its own defaults for the chosen instance type.
I’ll update the field description to make that clear.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated the description, please take a look again.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated the description again to make it more concise:
When omitted, this means no opinion and the AWS platform is left to choose a reasonable default.

// cpuOptions defines CPU-related settings for the instance, including the confidential computing policy.
// If unset, no cpuOptions will be included in the API request to AWS, and the instance will use the default CPU options
// applied by AWS for the selected intance type.
// +kubebuilder:validation:MinProperties=1
Copy link
Contributor

Choose a reason for hiding this comment

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

Pop this one on the struct rather than the field please

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated.

// More details can be checked at https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/sev-snp.html
// When omitted, this means no opinion and the AWS platform is left to choose a reasonable default,
// which is subject to change without notice. The current default is Disabled.
// +kubebuilder:validation:Enum=Disabled;AMDEncrytedVirtualizationNestedPaging
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason to put this here, vs on the type definition on L119?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The placement of this line differs between AWSNetworkInterfaceType (within the struct) and MarketType (on the type definition). I was unsure which pattern to follow, so I selected one approach arbitrarily.

@fangge1212 fangge1212 force-pushed the aws_amd_sev_snp branch 2 times, most recently from 89d92a1 to f5ba092 Compare September 3, 2025 08:44
@fangge1212 fangge1212 requested a review from JoelSpeed September 4, 2025 02:01
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 6, 2025
@openshift-ci-robot
Copy link

/test remaining-required

Overriding unmatched contexts:
/override ci/prow/e2e-aws-ovn ci/prow/e2e-aws-ovn-hypershift ci/prow/e2e-aws-ovn-hypershift-conformance ci/prow/e2e-aws-ovn-techpreview ci/prow/e2e-aws-serial-1of2 ci/prow/e2e-aws-serial-2of2 ci/prow/e2e-aws-serial-techpreview-1of2 ci/prow/e2e-aws-serial-techpreview-2of2 ci/prow/e2e-azure ci/prow/e2e-gcp ci/prow/e2e-upgrade ci/prow/e2e-upgrade-out-of-change

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 6, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: everettraven

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 6, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 6, 2025

@openshift-ci-robot: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

/test build
/test e2e-aws-ovn
/test e2e-aws-ovn-hypershift
/test e2e-aws-ovn-hypershift-conformance
/test e2e-aws-ovn-techpreview
/test e2e-aws-serial-1of2
/test e2e-aws-serial-2of2
/test e2e-aws-serial-techpreview-1of2
/test e2e-aws-serial-techpreview-2of2
/test e2e-azure
/test e2e-gcp
/test e2e-upgrade
/test e2e-upgrade-out-of-change
/test images
/test integration
/test lint
/test minor-e2e-upgrade-minor
/test minor-images
/test okd-scos-images
/test unit
/test verify
/test verify-client-go
/test verify-crd-schema
/test verify-crdify
/test verify-deps
/test verify-feature-promotion

The following commands are available to trigger optional jobs:

/test okd-scos-e2e-aws-ovn

Use /test all to run the following jobs that were automatically triggered:

pull-ci-openshift-api-master-build
pull-ci-openshift-api-master-images
pull-ci-openshift-api-master-integration
pull-ci-openshift-api-master-lint
pull-ci-openshift-api-master-minor-images
pull-ci-openshift-api-master-okd-scos-images
pull-ci-openshift-api-master-unit
pull-ci-openshift-api-master-verify
pull-ci-openshift-api-master-verify-client-go
pull-ci-openshift-api-master-verify-crd-schema
pull-ci-openshift-api-master-verify-crdify
pull-ci-openshift-api-master-verify-deps
pull-ci-openshift-api-master-verify-feature-promotion

In response to this:

/test remaining-required

Overriding unmatched contexts:
/override ci/prow/e2e-aws-ovn ci/prow/e2e-aws-ovn-hypershift ci/prow/e2e-aws-ovn-hypershift-conformance ci/prow/e2e-aws-ovn-techpreview ci/prow/e2e-aws-serial-1of2 ci/prow/e2e-aws-serial-2of2 ci/prow/e2e-aws-serial-techpreview-1of2 ci/prow/e2e-aws-serial-techpreview-2of2 ci/prow/e2e-azure ci/prow/e2e-gcp ci/prow/e2e-upgrade ci/prow/e2e-upgrade-out-of-change

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.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 6, 2025

@openshift-ci-robot: Overrode contexts on behalf of openshift-ci-robot: ci/prow/e2e-aws-ovn, ci/prow/e2e-aws-ovn-hypershift, ci/prow/e2e-aws-ovn-hypershift-conformance, ci/prow/e2e-aws-ovn-techpreview, ci/prow/e2e-aws-serial-1of2, ci/prow/e2e-aws-serial-2of2, ci/prow/e2e-aws-serial-techpreview-1of2, ci/prow/e2e-aws-serial-techpreview-2of2, ci/prow/e2e-azure, ci/prow/e2e-gcp, ci/prow/e2e-upgrade, ci/prow/e2e-upgrade-out-of-change

In response to this:

/test remaining-required

Overriding unmatched contexts:
/override ci/prow/e2e-aws-ovn ci/prow/e2e-aws-ovn-hypershift ci/prow/e2e-aws-ovn-hypershift-conformance ci/prow/e2e-aws-ovn-techpreview ci/prow/e2e-aws-serial-1of2 ci/prow/e2e-aws-serial-2of2 ci/prow/e2e-aws-serial-techpreview-1of2 ci/prow/e2e-aws-serial-techpreview-2of2 ci/prow/e2e-azure ci/prow/e2e-gcp ci/prow/e2e-upgrade ci/prow/e2e-upgrade-out-of-change

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.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 6, 2025

@everettraven: Overrode contexts on behalf of everettraven: ci/prow/lint

In response to this:

lint check is failing on two known issues due to this being an API that is validated via webhook and not via the standard CRD validation cycle. Our linter isn't aware of these nuances at the moment, so overriding.

/override ci/prow/lint

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.

@everettraven
Copy link
Contributor

@fangge1212 over to you for getting the verified label

@fangge1212
Copy link
Contributor Author

/verified later @yalzhang

@openshift-ci-robot openshift-ci-robot added verified-later verified Signifies that the PR passed pre-merge verification criteria labels Oct 8, 2025
@openshift-ci-robot
Copy link

@fangge1212: This PR has been marked to be verified later by @yalzhang.

In response to this:

/verified later @yalzhang

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 230d0e0 and 2 for PR HEAD 5f65881 in total

@fangge1212
Copy link
Contributor Author

/retest-required

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 3a4cc53 and 1 for PR HEAD 5f65881 in total

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD c9bef43 and 0 for PR HEAD 5f65881 in total

@openshift-ci-robot
Copy link

/hold

Revision 5f65881 was retested 3 times: holding

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 9, 2025
@fangge1212
Copy link
Contributor Author

/override ci/prow/lint
/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 9, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 9, 2025

@fangge1212: fangge1212 unauthorized: /override is restricted to Repo administrators, approvers in top level OWNERS file, and the following github teams:openshift: openshift-release-oversight openshift-staff-engineers openshift-sustaining-engineers.

In response to this:

/override ci/prow/lint
/unhold

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.

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD c9bef43 and 2 for PR HEAD 5f65881 in total

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 58cae3d and 1 for PR HEAD 5f65881 in total

@JoelSpeed
Copy link
Contributor

/override ci/prow/lint

Go validated type, not openapi which is how the current configuration is configured

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 9, 2025

@JoelSpeed: Overrode contexts on behalf of JoelSpeed: ci/prow/lint

In response to this:

/override ci/prow/lint

Go validated type, not openapi which is how the current configuration is configured

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.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 9, 2025

@fangge1212: all tests passed!

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. verified Signifies that the PR passed pre-merge verification criteria verified-later

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants