mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-21 11:54:14 +02:00
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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user