change volume specs to int32 and define max iops and throughput values (#3139)

* change int64 volume specs to int32 like in used AWS lib
* upper iops and throughput limits
* minor refactoring in ebs.go
This commit is contained in:
Felix Kunde
2026-07-27 16:32:22 +02:00
committed by GitHub
parent 56a8f1d90b
commit d268c589c2
14 changed files with 67 additions and 73 deletions
@@ -3258,7 +3258,8 @@ spec:
description: Volume describes a single volume in the manifest.
properties:
iops:
format: int64
format: int32
maximum: 80000
type: integer
isSubPathExpr:
type: boolean
@@ -3319,7 +3320,8 @@ spec:
subPath:
type: string
throughput:
format: int64
format: int32
maximum: 2000
type: integer
type:
type: string
+5 -3
View File
@@ -167,9 +167,11 @@ type Volume struct {
StorageClass string `json:"storageClass,omitempty"`
SubPath string `json:"subPath,omitempty"`
IsSubPathExpr *bool `json:"isSubPathExpr,omitempty"`
Iops *int64 `json:"iops,omitempty"`
Throughput *int64 `json:"throughput,omitempty"`
VolumeType string `json:"type,omitempty"`
// +kubebuilder:validation:Maximum=80000
Iops *int32 `json:"iops,omitempty"`
// +kubebuilder:validation:Maximum=2000
Throughput *int32 `json:"throughput,omitempty"`
VolumeType string `json:"type,omitempty"`
}
// AdditionalVolume specs additional optional volumes for statefulset
@@ -1686,12 +1686,12 @@ func (in *Volume) DeepCopyInto(out *Volume) {
}
if in.Iops != nil {
in, out := &in.Iops, &out.Iops
*out = new(int64)
*out = new(int32)
**out = **in
}
if in.Throughput != nil {
in, out := &in.Throughput, &out.Throughput
*out = new(int64)
*out = new(int32)
**out = **in
}
return