Skip to content

Commit 68c834e

Browse files
committed
machine_webhooks: GCP now supports SEV on c3d machines
Extend gcpConfidentialComputeSupportedMachineSeries to also consider c3d machines capable of running SEV confidential machines.
1 parent dbdb61e commit 68c834e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/webhooks/machine_webhook.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ const (
225225

226226
// GCP Confidential VM supports Compute Engine machine types in the following series:
227227
// reference: https://cloud.google.com/compute/confidential-vm/docs/os-and-machine-type#machine-type
228-
var gcpConfidentialComputeSupportedMachineSeries = []string{"n2d", "c2d"}
228+
var gcpConfidentialComputeSupportedMachineSeries = []string{"n2d", "c2d", "c3d"}
229229

230230
// defaultInstanceTypeForCloudProvider returns the default instance type for the given cloud provider and architecture.
231231
// If the cloud provider is not supported, an empty string is returned.

pkg/webhooks/machine_webhook_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3825,7 +3825,7 @@ func TestValidateGCPProviderSpec(t *testing.T) {
38253825
p.MachineType = "e2-standard-4"
38263826
},
38273827
expectedOk: false,
3828-
expectedError: "providerSpec.machineType: Invalid value: \"e2-standard-4\": ConfidentialCompute require machine type in the following series: n2d,c2d",
3828+
expectedError: "providerSpec.machineType: Invalid value: \"e2-standard-4\": ConfidentialCompute require machine type in the following series: n2d,c2d,c3d",
38293829
},
38303830
{
38313831
testCase: "with GPUs and Migrate onHostMaintenance",

0 commit comments

Comments
 (0)