diff --git a/delivery.yaml b/delivery.yaml index b9d6bbe3e..a4d42af7d 100644 --- a/delivery.yaml +++ b/delivery.yaml @@ -39,7 +39,7 @@ pipeline: go test ./... - desc: 'Run e2e tests' cmd: | - echo "" || make e2e + make e2e - desc: 'Push docker image' cmd: | export PATH=$PATH:$HOME/go/bin diff --git a/docs/reference/operator_parameters.md b/docs/reference/operator_parameters.md index 5a5a7edc0..b41f2c1fc 100644 --- a/docs/reference/operator_parameters.md +++ b/docs/reference/operator_parameters.md @@ -368,6 +368,13 @@ configuration they are grouped under the `kubernetes` key. changes PVC definition, off - disables resize of the volumes. Default is "ebs". When using OpenShift please use one of the other available options. +* **enable_ebs_gp3_migration** + enable automatic migration on AWS from gp2 volumes to gp3 volumes, smaller than configured max size. + it ignored that ebs gp3 is by default only 125mb/sec vs 250mb/sec for gp2 >= 333gb. + +* **enable_ebs_gp3_migration_max_size** + defines the maximum volume size until which auto migration happens, default 1tb which matches 3000iops default + ## Kubernetes resource requests This group allows you to configure resource requests for the Postgres pods. diff --git a/pkg/cluster/volumes.go b/pkg/cluster/volumes.go index d7452b0c8..162d24075 100644 --- a/pkg/cluster/volumes.go +++ b/pkg/cluster/volumes.go @@ -295,7 +295,7 @@ func (c *Cluster) executeEBSMigration() error { } for _, volume := range awsVolumes { - if volume.VolumeType == "gp2" && volume.Size < c.OpConfig.EnableEBSGp3MaxSize { + if volume.VolumeType == "gp2" && volume.Size < c.OpConfig.EnableEBSGp3MigrationMaxSize { c.logger.Infof("modifying EBS volume %s to type gp3 migration (%d)", volume.VolumeID, volume.Size) err = c.VolumeResizer.ModifyVolume(volume.VolumeID, "gp3", volume.Size, 3000, 125) if nil != err { diff --git a/pkg/cluster/volumes_test.go b/pkg/cluster/volumes_test.go index 39ab984a0..ac838a438 100644 --- a/pkg/cluster/volumes_test.go +++ b/pkg/cluster/volumes_test.go @@ -218,9 +218,9 @@ func TestMigrateEBS(t *testing.T) { ClusterLabels: map[string]string{"application": "spilo"}, ClusterNameLabel: "cluster-name", }, - StorageResizeMode: "pvc", - EnableEBSGp3Migration: true, - EnableEBSGp3MaxSize: 1000, + StorageResizeMode: "pvc", + EnableEBSGp3Migration: true, + EnableEBSGp3MigrationMaxSize: 1000, }, }, client, acidv1.Postgresql{}, logger, eventRecorder) cluster.Spec.Volume.Size = "1Gi" diff --git a/pkg/util/config/config.go b/pkg/util/config/config.go index 8e79d0abe..12c285f10 100644 --- a/pkg/util/config/config.go +++ b/pkg/util/config/config.go @@ -199,7 +199,7 @@ type Config struct { EnableLazySpiloUpgrade bool `name:"enable_lazy_spilo_upgrade" default:"false"` EnablePgVersionEnvVar bool `name:"enable_pgversion_env_var" default:"false"` EnableEBSGp3Migration bool `name:"enable_ebs_gp3_migration" default:"false"` - EnableEBSGp3MaxSize int64 `name:"enable_ebs_gp3_max_size" default:"1000"` + EnableEBSGp3MigrationMaxSize int64 `name:"enable_ebs_gp3_migration_max_size" default:"1000"` } // MustMarshal marshals the config or panics