← Back to Pull requests

✨Add support for AMD SEV-SNP instances #5598

Closed
unknown closed this pull request without merging on Aug 06, 2025 22:38 UTC
View on GitHub
unknown unknown commented on Jul 23, 2025 10:02 UTC
Author

<!-- Thanks for this PR! If this is your first PR please read the [contributing guide](../CONTRIBUTING.md) -->
<!-- If this PR is still work-in-progress and is being open for visibility please prefix the title with WIP: -->

What type of PR is this?
/kind feature
<!--
Add one of the following kinds:
/kind feature
/kind bug
/kind api-change
/kind cleanup
/kind deprecation
/kind design
/kind documentation
/kind failing-test
/kind flake
/kind regression
/kind support
-->

What this PR does / why we need it:
This PR adds support for AMD SEV-SNP instances.

<!-- Enter a description of the change and why this change is needed -->

Special notes for your reviewer:
1. I'm unsure how best to represent AmdSevSNP enablement/disablement in AWSMachineSpec.
Currently, I’ve introduced a cpuOptions struct with a enum type field AmdSevSNP(values: enabled, disabled), which is consistent with AWS's approach.
Alternatively, we could use an enum with values like AmdSevSNP(and TDX in the fugure), which would make it easier to support other confidential computing technologies(I submitted another pr https://github.com/kubernetes-sigs/cluster-api-provider-aws/pull/5605). I'm not sure which one is better.
2. Do we need to check the specified instance type is valid for AmdSevSnp?
Currently, I hard coded the supported instance type list, but it may be a burden to keep the list up-to-date. Perhaps we skip the instance type validation and can rely on the AWS end to fail if a unsupported instance type is used for AmdSevSnp?

Checklist:
<!-- Put an "X" character inside the brackets of each completed task. Some may be optional depending on the PR in which case these can be deleted

Please add an icon to the title of this PR, the icon will be either ⚠️ (:warning:, major or breaking changes), ✨ (:sparkles:, feature additions), 🐛 (:bug:, patch and bugfixes), 📖 (:book:, documentation or proposals), or 🌱 (:seedling:, minor or other)
-->

  • [X] squashed commits

  • includes documentation

  • [X] includes emoji in title

  • [X] adds unit tests

  • adds or updates e2e tests
  • Release note:
    <!-- Write your release note:
    1. Enter your extended release note in the below block. If the PR requires additional action from users switching to the new release, include the string "action required".
    2. If no release note is required, just write "NONE".
    -->

    Add support for AMD SEV-SNP instances
    
    

    Diff: 309 lines (+231 / -78) across 3 files Reviewer: fangge1212 Review duration: 20915m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 309 lines diff across 3 files
    0.40
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.343
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #5598"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 40.2% (MEDIUM) · Higher = larger blast radius
    40.2%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 15.9% · Safe to merge
    15.9%