-
Notifications
You must be signed in to change notification settings - Fork 559
Support AMD SEV-SNP on AWS #2424
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: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,10 @@ type AWSMachineProviderConfig struct { | |
AMI AWSResourceReference `json:"ami"` | ||
// instanceType is the type of instance to create. Example: m4.xlarge | ||
InstanceType string `json:"instanceType"` | ||
// 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. | ||
// +optional | ||
CPUOptions *CPUOptions `json:"cpuOptions,omitempty"` | ||
// tags is the set of tags to add to apply to an instance, in addition to the ones | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi @fangge1212, would it make sense to use a field named In case AWS supports other confidential computing technologies in the future, that would be easier to extend than this approach IMO. As it would require adding another new field to the API instead of a new value to the enum. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as kubernetes-sigs/cluster-api-provider-aws#5598, waiting for more opinions before chaning it |
||
// added by default by the actuator. These tags are additive. The actuator will ensure | ||
// these tags are present, but will not remove any other tags that may exist on the | ||
|
@@ -109,6 +113,34 @@ type AWSMachineProviderConfig struct { | |
MarketType MarketType `json:"marketType,omitempty"` | ||
} | ||
|
||
// AWSConfidentialComputePolicy represents the confidential compute configuration for the instance. | ||
type AWSConfidentialComputePolicy string | ||
|
||
const ( | ||
// AWSConfidentialComputePolicyDisabled disables confidential computing for the instance. | ||
AWSConfidentialComputePolicyDisabled AWSConfidentialComputePolicy = "Disabled" | ||
// AWSConfidentialComputePolicySEVSNP enables AMD SEV-SNP as the confidential computing technology for the instance. | ||
AWSConfidentialComputePolicySEVSNP AWSConfidentialComputePolicy = "AMDEncrytedVirtualizationNestedPaging" | ||
) | ||
|
||
// CPUOptions defines CPU-related settings for the instance, including the confidential computing policy. | ||
type CPUOptions struct { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We try to avoid things like Add the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When I add
|
||
// confidentialCompute specifies whether confidential computing should be enabled for the instance, | ||
// and, if so, which confidential computing technology to use. | ||
// Valid values are: Disabled, AMDEncrytedVirtualizationNestedPaging | ||
// When set to Disabled, confidential computing will be disabled for the instance. | ||
// When set to AMDEncrytedVirtualizationNestedPaging, AMD SEV-SNP will be used as the confidential computing technology for the instance. | ||
// In this case, ensure the following conditions are met: | ||
// 1) The selected instance type supports AMD SEV-SNP. | ||
// 2) The selected AWS region supports AMD SEV-SNP. | ||
// 3) The selected AMI supports AMD SEV-SNP. | ||
// 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 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 | ||
// +optional | ||
ConfidentialCompute AWSConfidentialComputePolicy `json:"confidentialCompute,omitempty"` | ||
} | ||
|
||
// BlockDeviceMappingSpec describes a block device mapping | ||
type BlockDeviceMappingSpec struct { | ||
// The device name exposed to the machine (for example, /dev/sdh or xvdh). | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
What happens if this field is not specified by a user?
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.
If unset, no CPU options are passed to the AWS platform and AWS default values are used.