Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ require (
github.com/onsi/ginkgo/v2 v2.27.2
github.com/onsi/gomega v1.38.2
github.com/openshift-eng/openshift-tests-extension v0.0.0-20251105193959-75a0be5d9bd7
github.com/openshift/api v0.0.0-20251120220512-cb382c9eaf42
github.com/openshift/api v0.0.0-20251111193948-50e2ece149d7
github.com/openshift/client-go v0.0.0-20251015124057-db0dee36e235
github.com/openshift/cluster-api-actuator-pkg/testutils v0.0.0-20250910145856-21d03d30056d
github.com/openshift/cluster-control-plane-machine-set-operator v0.0.0-20251029084908-344babe6a957
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -449,8 +449,8 @@ github.com/opencontainers/selinux v1.11.1 h1:nHFvthhM0qY8/m+vfhJylliSshm8G1jJ2jD
github.com/opencontainers/selinux v1.11.1/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec=
github.com/openshift-eng/openshift-tests-extension v0.0.0-20251105193959-75a0be5d9bd7 h1:Z1swlS6b3Adm6RPhjqefs3DWnNFLDxRX+WC8GMXhja4=
github.com/openshift-eng/openshift-tests-extension v0.0.0-20251105193959-75a0be5d9bd7/go.mod h1:6gkP5f2HL0meusT0Aim8icAspcD1cG055xxBZ9yC68M=
github.com/openshift/api v0.0.0-20251120220512-cb382c9eaf42 h1:Mo2FlDdoCZ+BE2W4C0lNcxEDeIIhfsYFP6vj4Sggp8w=
github.com/openshift/api v0.0.0-20251120220512-cb382c9eaf42/go.mod h1:d5uzF0YN2nQQFA0jIEWzzOZ+edmo6wzlGLvx5Fhz4uY=
github.com/openshift/api v0.0.0-20251111193948-50e2ece149d7 h1:MemawsK6SpxEaE5y0NqO5sIX3yTLIIyP89w6DGKukAk=
github.com/openshift/api v0.0.0-20251111193948-50e2ece149d7/go.mod h1:d5uzF0YN2nQQFA0jIEWzzOZ+edmo6wzlGLvx5Fhz4uY=
github.com/openshift/client-go v0.0.0-20251015124057-db0dee36e235 h1:9JBeIXmnHlpXTQPi7LPmu1jdxznBhAE7bb1K+3D8gxY=
github.com/openshift/client-go v0.0.0-20251015124057-db0dee36e235/go.mod h1:L49W6pfrZkfOE5iC1PqEkuLkXG4W0BX4w8b+L2Bv7fM=
github.com/openshift/cluster-api-actuator-pkg/testutils v0.0.0-20250910145856-21d03d30056d h1:+sqUThLi/lmgT5/scmmjnS6+RZFtbdxRAscNfCPyLPI=
Expand Down
26 changes: 0 additions & 26 deletions pkg/webhooks/machine_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -799,32 +799,6 @@ func validateAWS(m *machinev1beta1.Machine, config *admissionConfig) (bool, []st

// TODO(alberto): Validate providerSpec.BlockDevices.
// https://github.com/openshift/cluster-api-provider-aws/pull/299#discussion_r433920532
for i, blockDevice := range providerSpec.BlockDevices {
ebs := blockDevice.EBS
if ebs == nil || ebs.VolumeType == nil || ebs.ThroughputMib == nil {
continue
}

throughputPath := field.NewPath("providerSpec", "blockDevices").Index(i).Child("ebs", "throughputMib")
throughputValue := *ebs.ThroughputMib

if *ebs.VolumeType != "gp3" {
errs = append(errs, field.Invalid(
throughputPath,
throughputValue,
"only valid for gp3 volumes",
))
continue
}

if throughputValue < 125 || throughputValue > 2000 {
errs = append(errs, field.Invalid(
throughputPath,
throughputValue,
"must be a value between 125 and 2000",
))
}
}

switch providerSpec.Placement.Tenancy {
case "", machinev1beta1.DefaultTenancy, machinev1beta1.DedicatedTenancy, machinev1beta1.HostTenancy:
Expand Down
84 changes: 0 additions & 84 deletions pkg/webhooks/machine_webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -451,90 +451,6 @@ func TestMachineCreation(t *testing.T) {
},
expectedError: "admission webhook \"validation.machine.machine.openshift.io\" denied the request: spec.hostPlacement.dedicatedHost.id: Invalid value: \"invalid\": id must start with 'h-' followed by 17 lowercase hexadecimal characters (0-9 and a-f)",
},
{
name: "with VolumeType set to gp3 and Throughput set under minium value",
platformType: osconfigv1.AWSPlatformType,
clusterID: "aws-cluster",
providerSpecValue: &kruntime.RawExtension{
Object: &machinev1beta1.AWSMachineProviderConfig{
AMI: machinev1beta1.AWSResourceReference{
ID: ptr.To[string]("ami"),
},
BlockDevices: []machinev1beta1.BlockDeviceMappingSpec{
{
EBS: &machinev1beta1.EBSBlockDeviceSpec{
VolumeType: ptr.To[string]("gp3"),
ThroughputMib: ptr.To[int32](124),
},
},
},
},
},
expectedError: "must be a value between 125 and 2000",
},
{
name: "with VolumeType set to gp3 and Throughput set over maxium value",
platformType: osconfigv1.AWSPlatformType,
clusterID: "aws-cluster",
providerSpecValue: &kruntime.RawExtension{
Object: &machinev1beta1.AWSMachineProviderConfig{
AMI: machinev1beta1.AWSResourceReference{
ID: ptr.To[string]("ami"),
},
BlockDevices: []machinev1beta1.BlockDeviceMappingSpec{
{
EBS: &machinev1beta1.EBSBlockDeviceSpec{
VolumeType: ptr.To[string]("gp3"),
ThroughputMib: ptr.To[int32](2001),
},
},
},
},
},
expectedError: "must be a value between 125 and 2000",
},
{
name: "with VolumeType set to gp3 and Throughput set within range",
platformType: osconfigv1.AWSPlatformType,
clusterID: "aws-cluster",
providerSpecValue: &kruntime.RawExtension{
Object: &machinev1beta1.AWSMachineProviderConfig{
AMI: machinev1beta1.AWSResourceReference{
ID: ptr.To[string]("ami"),
},
BlockDevices: []machinev1beta1.BlockDeviceMappingSpec{
{
EBS: &machinev1beta1.EBSBlockDeviceSpec{
VolumeType: ptr.To[string]("gp3"),
ThroughputMib: ptr.To[int32](1000),
},
},
},
},
},
expectedError: "",
},
{
name: "with Throughput set on non gp3 volume",
platformType: osconfigv1.AWSPlatformType,
clusterID: "aws-cluster",
providerSpecValue: &kruntime.RawExtension{
Object: &machinev1beta1.AWSMachineProviderConfig{
AMI: machinev1beta1.AWSResourceReference{
ID: ptr.To[string]("ami"),
},
BlockDevices: []machinev1beta1.BlockDeviceMappingSpec{
{
EBS: &machinev1beta1.EBSBlockDeviceSpec{
VolumeType: ptr.To[string]("io1"),
ThroughputMib: ptr.To[int32](124),
},
},
},
},
},
expectedError: "only valid for gp3 volumes",
},
{
name: "with Azure and a nil provider spec value",
platformType: osconfigv1.AzurePlatformType,
Expand Down
96 changes: 0 additions & 96 deletions vendor/github.com/openshift/api/config/v1/types_infrastructure.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions vendor/github.com/openshift/api/config/v1/types_node.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading