Add securityProfile support for TrustedLaunch VMs#2020
Conversation
Azure enforces TrustedLaunch on Gen2 VMs using gallery images, causing VM creation to fail with a 400 BadRequest. Add a `securityProfile` field to the Azure provider spec so users can set `securityType` to TrustedLaunch (with optional secure boot and vTPM) or Standard (to opt out). Fixes #2013 Signed-off-by: Burak Sekili <32663655+buraksekili@users.noreply.github.com>
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/hold still working and need to test |
…ween provider and tests. Signed-off-by: Burak Sekili <32663655+buraksekili@users.noreply.github.com>
replace repeated "Standard_D2s_v3" and "Standard_A2" strings with `testVMSizeGen2` and `testVMSizeGen1` constants. Signed-off-by: Burak Sekili <32663655+buraksekili@users.noreply.github.com>
|
@buraksekili: The following tests failed, say
DetailsInstructions 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. |
What this PR does / why we need it:
Azure enforces TrustedLaunch on Gen2 VMs using Compute Gallery images, causing VM creation to fail with a 400 BadRequest. This PR adds a
securityProfilefield to the Azure cloud provider spec so users can setsecurityTypetoTrustedLaunch(with optionalsecureBootEnabledandvTpmEnabled) orStandard(to opt out of auto-enforced TrustedLaunch on subscriptions where Azure enables it by default).Which issue(s) this PR fixes:
Fixes #2013
What type of PR is this?
/kind feature
Special notes for your reviewer:
validateSecurityProfilerejects TrustedLaunch on non-Gen2 SKUs to fail fast before reaching Azure: https://learn.microsoft.com/en-us/azure/virtual-machines/generation-2 and https://learn.microsoft.com/en-us/azure/virtual-machines/trusted-launch-existing-vm-gen-1secureBootEnabledandvTpmEnabledare optional. Azure defaults: vTPM enabled, Secure Boot disabled. Source: https://learn.microsoft.com/en-us/azure/virtual-machines/trusted-launch-existing-vm-gen-1#upgrade-gen1-vm-to-trusted-launchsecurityType: Standardrequires theUseStandardSecurityTypesubscription feature flag, which Azure enforces. We do not pre-check feature-flag registration (consistent with how image SecurityType is handled): https://learn.microsoft.com/en-us/azure/virtual-machines/trusted-launch-faq#can-i-disable-trusted-launch-for-a-new-vm-deploymentTrustedLaunchByDefaultPreview) means new Gen2 VMs on preview-registered subscriptions auto-enable TrustedLaunch unlessStandardis explicitly set: https://learn.microsoft.com/en-us/azure/virtual-machines/trusted-launch#preview-trusted-launch-as-defaultDoes this PR introduce a user-facing change? Then add your Release Note here:
Documentation: