From 0ea05f76915f99d65c4c95aa2aec4011ec26ed3a Mon Sep 17 00:00:00 2001 From: Felix Kunde Date: Fri, 24 Jul 2026 09:15:26 +0200 Subject: [PATCH 1/4] Fix no space left error during e2e test setup (#3138) * fix space issues for e2e test * pin exact minor release of coveralls --- .github/workflows/run_e2e.yaml | 7 +++++++ .github/workflows/run_tests.yaml | 6 +++--- e2e/run.sh | 15 ++++++++++++--- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/.github/workflows/run_e2e.yaml b/.github/workflows/run_e2e.yaml index 393109b00..08843ab2b 100644 --- a/.github/workflows/run_e2e.yaml +++ b/.github/workflows/run_e2e.yaml @@ -21,5 +21,12 @@ jobs: run: make codegen - name: Run unit tests run: make test + - name: Pre-pull heavy images directly on Kind nodes + run: | + FOR_NODE=$(kind get nodes --name postgres-operator-e2e-tests 2>/dev/null || true) + for node in $FOR_NODE; do + echo "Pulling Spilo image on node $node..." + docker exec "$node" crictl pull ghcr.io/zalando/spilo-18:4.1-p2 + done - name: Run end-2-end tests run: make e2e diff --git a/.github/workflows/run_tests.yaml b/.github/workflows/run_tests.yaml index c511e8fa1..5f68f6309 100644 --- a/.github/workflows/run_tests.yaml +++ b/.github/workflows/run_tests.yaml @@ -22,9 +22,9 @@ jobs: - name: Run unit tests run: go test -race -covermode atomic -coverprofile=coverage.out ./... - name: Convert coverage to lcov - uses: jandelgado/gcov2lcov-action@v1.1.1 + uses: jandelgado/gcov2lcov-action@v1.2.0 - name: Coveralls - uses: coverallsapp/github-action@master + uses: coverallsapp/github-action@v2.3.4 with: github-token: ${{ secrets.GITHUB_TOKEN }} - path-to-lcov: coverage.lcov + file: coverage.lcov diff --git a/e2e/run.sh b/e2e/run.sh index c5daf81f6..0bcf67989 100755 --- a/e2e/run.sh +++ b/e2e/run.sh @@ -24,6 +24,15 @@ esac echo "Clustername: ${cluster_name}" echo "Kubeconfig path: ${kubeconfig_path}" +# Helper function to pull images directly into kind nodes via crictl (bypasses host disk duplication) +function pull_on_kind_nodes() { + local img="$1" + echo "Pulling ${img} directly on kind nodes..." + for node in $(kind get nodes --name "${cluster_name}"); do + docker exec "$node" crictl pull "${img}" + done +} + function pull_images(){ operator_tag=$(git describe --tags --always --dirty) components=("postgres-operator" "pooler") @@ -66,14 +75,14 @@ function start_kind(){ export KUBECONFIG="${kubeconfig_path}" kind create cluster --name ${cluster_name} --config kind-cluster-postgres-operator-e2e-tests.yaml - echo "Pulling Spilo image for platform ${PLATFORM}" - docker pull --platform ${PLATFORM} "${spilo_image}" - kind load docker-image "${spilo_image}" --name ${cluster_name} + echo "Pulling Spilo image on kind nodes directly..." + pull_on_kind_nodes "${spilo_image}" } function load_operator_images() { echo "Loading operator images" export KUBECONFIG="${kubeconfig_path}" + # For locally built operator images, kind load is still fine since they're light kind load docker-image "${operator_image}" --name ${cluster_name} kind load docker-image "${pooler_image}" --name ${cluster_name} } From bffde0f5e7cc4db91e56bba709a6a02f656568e4 Mon Sep 17 00:00:00 2001 From: Felix Kunde Date: Fri, 24 Jul 2026 16:39:41 +0200 Subject: [PATCH 2/4] fix type deference when calling ebs modify volume endpoint (#3140) * fix type deference when calling ebs modify volume endpoint * only pass set variable to modify input --- pkg/util/volumes/ebs.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pkg/util/volumes/ebs.go b/pkg/util/volumes/ebs.go index bb7506d93..212ee8ac4 100644 --- a/pkg/util/volumes/ebs.go +++ b/pkg/util/volumes/ebs.go @@ -155,23 +155,32 @@ func (r *EBSVolumeResizer) ResizeVolume(volumeID string, newSize int64) error { // ModifyVolume Modify EBS volume func (r *EBSVolumeResizer) ModifyVolume(volumeID string, newType *string, newSize *int64, iops *int64, throughput *int64) error { - /* first check if the volume is already of a requested size */ var sizeInt32 *int32 var iopsInt32 *int32 var throughputInt32 *int32 + + input := ec2.ModifyVolumeInput{ + VolumeId: &volumeID, + } if newSize != nil { s := int32(*newSize) sizeInt32 = &s + input.Size = sizeInt32 } if iops != nil { i := int32(*iops) iopsInt32 = &i + input.Iops = iopsInt32 } if throughput != nil { t := int32(*throughput) throughputInt32 = &t + input.Throughput = throughputInt32 } - input := ec2.ModifyVolumeInput{Size: sizeInt32, VolumeId: &volumeID, VolumeType: types.VolumeType(*newType), Iops: iopsInt32, Throughput: throughputInt32} + if newType != nil { + input.VolumeType = types.VolumeType(*newType) + } + output, err := r.connection.ModifyVolume(context.TODO(), &input) if err != nil { return fmt.Errorf("could not modify persistent volume: %v", err) From 56a8f1d90b70bb88dd06b7f193be61b822076782 Mon Sep 17 00:00:00 2001 From: Felix Kunde Date: Mon, 27 Jul 2026 14:02:44 +0200 Subject: [PATCH 3/4] remove gp3 migration flow (#3142) --- .../crds/operatorconfigurations.yaml | 5 - charts/postgres-operator/values.yaml | 6 +- docs/reference/operator_parameters.md | 12 +- docs/user.md | 2 +- manifests/complete-postgres-manifest.yaml | 4 +- manifests/configmap.yaml | 2 - manifests/operatorconfiguration.crd.yaml | 5 - ...gresql-operator-default-configuration.yaml | 2 - .../v1/operator_configuration_type.go | 20 ++- .../v1/operatorconfiguration.crd.yaml | 5 - pkg/cluster/cluster.go | 2 +- pkg/cluster/sync.go | 9 -- pkg/cluster/volumes.go | 65 +-------- pkg/cluster/volumes_test.go | 134 +----------------- pkg/controller/operator_config.go | 2 - pkg/util/config/config.go | 2 - pkg/util/volumes/ebs.go | 14 +- 17 files changed, 31 insertions(+), 260 deletions(-) diff --git a/charts/postgres-operator/crds/operatorconfigurations.yaml b/charts/postgres-operator/crds/operatorconfigurations.yaml index ebe4e7089..5fdf8aad8 100644 --- a/charts/postgres-operator/crds/operatorconfigurations.yaml +++ b/charts/postgres-operator/crds/operatorconfigurations.yaml @@ -66,11 +66,6 @@ spec: aws_region: default: eu-central-1 type: string - enable_ebs_gp3_migration: - type: boolean - enable_ebs_gp3_migration_max_size: - format: int64 - type: integer gcp_credentials: type: string irsa_role_arn: diff --git a/charts/postgres-operator/values.yaml b/charts/postgres-operator/values.yaml index 4ea5b6319..ca835308c 100644 --- a/charts/postgres-operator/values.yaml +++ b/charts/postgres-operator/values.yaml @@ -350,16 +350,12 @@ configAwsOrGcp: # AWS region used to store EBS volumes aws_region: eu-central-1 - # enable automatic migration on AWS from gp2 to gp3 volumes - enable_ebs_gp3_migration: false - # defines maximum volume size in GB until which auto migration happens - # enable_ebs_gp3_migration_max_size: 1000 - # GCP credentials that will be used by the operator / pods # gcp_credentials: "" # AWS IAM role to supply in the iam.amazonaws.com/role annotation of Postgres pods # kube_iam_role: "" + # Full ARN for IRSA (IAM Roles for Service Accounts) on EKS # irsa_role_arn: "" diff --git a/docs/reference/operator_parameters.md b/docs/reference/operator_parameters.md index 02c6db8d0..caa1f6a1e 100644 --- a/docs/reference/operator_parameters.md +++ b/docs/reference/operator_parameters.md @@ -582,7 +582,7 @@ configuration they are grouped under the `kubernetes` key. 1. `ebs` : operator resizes EBS volumes directly and executes `resizefs` within a pod 2. `pvc` : operator only changes PVC definition 3. `off` : disables resize of the volumes. - 4. `mixed` : operator uses AWS API to adjust size, throughput, and IOPS, and calls pvc change for file system resize + 4. `mixed` : operator uses AWS API to adjust size, type, throughput, and IOPS, and calls pvc change for file system resize Default is "pvc". ## Kubernetes resource requests @@ -821,16 +821,6 @@ yet officially supported. Path to mount the above Secret in the filesystem of the container(s). The default is empty. -* **enable_ebs_gp3_migration** - enable automatic migration on AWS from gp2 to gp3 volumes, that are smaller - than the configured max size (see below). This ignores that EBS gp3 is by - default only 125 MB/sec vs 250 MB/sec for gp2 >= 333GB. - The default is `false`. - -* **enable_ebs_gp3_migration_max_size** - defines the maximum volume size in GB until which auto migration happens. - Default is 1000 (1TB) which matches 3000 IOPS. - ## Logical backup These parameters configure a K8s cron job managed by the operator to produce diff --git a/docs/user.md b/docs/user.md index 293ddf8c2..c1c2b8dc1 100644 --- a/docs/user.md +++ b/docs/user.md @@ -1129,7 +1129,7 @@ When using AWS with gp3 volumes you should set the mode to `mixed` because it will also adjust the IOPS and throughput that can be defined in the manifest. Check the [AWS docs](https://aws.amazon.com/ebs/general-purpose/) to learn about default and maximum values. Keep in mind that AWS rate-limits updating -volume specs to no more than once every 6 hours. +volume specs to no more than 4 times within 24 hours. ```yaml spec: diff --git a/manifests/complete-postgres-manifest.yaml b/manifests/complete-postgres-manifest.yaml index 93797e0e1..535f3a9f8 100644 --- a/manifests/complete-postgres-manifest.yaml +++ b/manifests/complete-postgres-manifest.yaml @@ -60,8 +60,8 @@ spec: volume: size: 1Gi # storageClass: my-sc -# iops: 1000 # for EBS gp3 -# throughput: 250 # in MB/s for EBS gp3 +# iops: 1000 +# throughput: 250 # in MB/s # selector: # matchExpressions: # - { key: flavour, operator: In, values: [ "banana", "chocolate" ] } diff --git a/manifests/configmap.yaml b/manifests/configmap.yaml index c7f4d2655..e85da7c48 100644 --- a/manifests/configmap.yaml +++ b/manifests/configmap.yaml @@ -41,8 +41,6 @@ data: enable_cross_namespace_secret: "false" enable_finalizers: "false" enable_database_access: "true" - enable_ebs_gp3_migration: "false" - enable_ebs_gp3_migration_max_size: "1000" enable_init_containers: "true" enable_lazy_spilo_upgrade: "false" enable_maintenance_windows: "true" diff --git a/manifests/operatorconfiguration.crd.yaml b/manifests/operatorconfiguration.crd.yaml index ebe4e7089..5fdf8aad8 100644 --- a/manifests/operatorconfiguration.crd.yaml +++ b/manifests/operatorconfiguration.crd.yaml @@ -66,11 +66,6 @@ spec: aws_region: default: eu-central-1 type: string - enable_ebs_gp3_migration: - type: boolean - enable_ebs_gp3_migration_max_size: - format: int64 - type: integer gcp_credentials: type: string irsa_role_arn: diff --git a/manifests/postgresql-operator-default-configuration.yaml b/manifests/postgresql-operator-default-configuration.yaml index e25a7b339..91f2b0888 100644 --- a/manifests/postgresql-operator-default-configuration.yaml +++ b/manifests/postgresql-operator-default-configuration.yaml @@ -167,8 +167,6 @@ configuration: # additional_secret_mount: "some-secret-name" # additional_secret_mount_path: "/some/dir" aws_region: eu-central-1 - enable_ebs_gp3_migration: false - # enable_ebs_gp3_migration_max_size: 1000 # gcp_credentials: "" # kube_iam_role: "" # irsa_role_arn: "" diff --git a/pkg/apis/acid.zalan.do/v1/operator_configuration_type.go b/pkg/apis/acid.zalan.do/v1/operator_configuration_type.go index 046dd0761..02765b8f1 100644 --- a/pkg/apis/acid.zalan.do/v1/operator_configuration_type.go +++ b/pkg/apis/acid.zalan.do/v1/operator_configuration_type.go @@ -246,17 +246,15 @@ type LoadBalancerConfiguration struct { type AWSGCPConfiguration struct { WALES3Bucket string `json:"wal_s3_bucket,omitempty"` // +kubebuilder:default=eu-central-1 - AWSRegion string `json:"aws_region,omitempty"` - WALGSBucket string `json:"wal_gs_bucket,omitempty"` - GCPCredentials string `json:"gcp_credentials,omitempty"` - WALAZStorageAccount string `json:"wal_az_storage_account,omitempty"` - LogS3Bucket string `json:"log_s3_bucket,omitempty"` - KubeIAMRole string `json:"kube_iam_role,omitempty"` - IRSARoleARN string `json:"irsa_role_arn,omitempty"` - AdditionalSecretMount string `json:"additional_secret_mount,omitempty"` - AdditionalSecretMountPath string `json:"additional_secret_mount_path,omitempty"` - EnableEBSGp3Migration bool `json:"enable_ebs_gp3_migration,omitempty"` - EnableEBSGp3MigrationMaxSize int64 `json:"enable_ebs_gp3_migration_max_size,omitempty"` + AWSRegion string `json:"aws_region,omitempty"` + WALGSBucket string `json:"wal_gs_bucket,omitempty"` + GCPCredentials string `json:"gcp_credentials,omitempty"` + WALAZStorageAccount string `json:"wal_az_storage_account,omitempty"` + LogS3Bucket string `json:"log_s3_bucket,omitempty"` + KubeIAMRole string `json:"kube_iam_role,omitempty"` + IRSARoleARN string `json:"irsa_role_arn,omitempty"` + AdditionalSecretMount string `json:"additional_secret_mount,omitempty"` + AdditionalSecretMountPath string `json:"additional_secret_mount_path,omitempty"` } // OperatorDebugConfiguration defines options for the debug mode diff --git a/pkg/apis/acid.zalan.do/v1/operatorconfiguration.crd.yaml b/pkg/apis/acid.zalan.do/v1/operatorconfiguration.crd.yaml index ebe4e7089..5fdf8aad8 100644 --- a/pkg/apis/acid.zalan.do/v1/operatorconfiguration.crd.yaml +++ b/pkg/apis/acid.zalan.do/v1/operatorconfiguration.crd.yaml @@ -66,11 +66,6 @@ spec: aws_region: default: eu-central-1 type: string - enable_ebs_gp3_migration: - type: boolean - enable_ebs_gp3_migration_max_size: - format: int64 - type: integer gcp_credentials: type: string irsa_role_arn: diff --git a/pkg/cluster/cluster.go b/pkg/cluster/cluster.go index 836bd086e..cb5b2a839 100644 --- a/pkg/cluster/cluster.go +++ b/pkg/cluster/cluster.go @@ -176,7 +176,7 @@ func New(cfg Config, kubeClient k8sutil.KubernetesClient, pgSpec acidv1.Postgres cluster.eventRecorder = eventRecorder cluster.EBSVolumes = make(map[string]volumes.VolumeProperties) - if cfg.OpConfig.StorageResizeMode != "pvc" || cfg.OpConfig.EnableEBSGp3Migration { + if cfg.OpConfig.StorageResizeMode != "pvc" { cluster.VolumeResizer = &volumes.EBSVolumeResizer{AWSRegion: cfg.OpConfig.AWSRegion} } diff --git a/pkg/cluster/sync.go b/pkg/cluster/sync.go index 5ada7ea9a..6e9f9348a 100644 --- a/pkg/cluster/sync.go +++ b/pkg/cluster/sync.go @@ -95,18 +95,10 @@ func (c *Cluster) Sync(newSpec *acidv1.Postgresql) error { c.logger.Errorf("could not sync Patroni resources: %v", err) } - // sync volume may already transition volumes to gp3, if iops/throughput or type is specified if err = c.syncVolumes(); err != nil { return err } - if c.OpConfig.EnableEBSGp3Migration && len(c.EBSVolumes) > 0 { - err = c.executeEBSMigration() - if nil != err { - return err - } - } - if err = c.syncPodServiceAccount(); err != nil { c.logger.Errorf("could not sync pod service account: %v", err) } @@ -1811,7 +1803,6 @@ func (c *Cluster) syncLogicalBackupJob() error { // no existing logical backup job, create new one c.logger.Info("could not find the cluster's logical backup job") - if err = c.createLogicalBackupJob(); err == nil { c.logger.Infof("created missing logical backup job %s", jobName) } else { diff --git a/pkg/cluster/volumes.go b/pkg/cluster/volumes.go index e32e558e6..c1762a073 100644 --- a/pkg/cluster/volumes.go +++ b/pkg/cluster/volumes.go @@ -11,7 +11,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "github.com/aws/aws-sdk-go-v2/aws" "github.com/zalando/postgres-operator/pkg/spec" "github.com/zalando/postgres-operator/pkg/util/constants" "github.com/zalando/postgres-operator/pkg/util/filesystems" @@ -79,9 +78,6 @@ func (c *Cluster) syncUnderlyingEBSVolume() error { } targetSize := quantityToGigabyte(newSize) - awsGp3 := aws.String("gp3") - awsIo2 := aws.String("io2") - errors := make([]string, 0) for _, volume := range c.EBSVolumes { @@ -106,20 +102,11 @@ func (c *Cluster) syncUnderlyingEBSVolume() error { modifySize = &targetSize } - if modifyIops != nil || modifyThroughput != nil || modifySize != nil { - if modifyIops != nil || modifyThroughput != nil { - // we default to gp3 if iops and throughput are configured - modifyType = awsGp3 - if targetValue.VolumeType == "io2" { - modifyType = awsIo2 - } - } else if targetValue.VolumeType == "gp3" && volume.VolumeType != "gp3" { - modifyType = awsGp3 - } else { - // do not touch type - modifyType = nil - } + if targetValue.VolumeType != "" && targetValue.VolumeType != volume.VolumeType { + modifyType = &targetValue.VolumeType + } + if modifyIops != nil || modifyThroughput != nil || modifySize != nil || modifyType != nil { err = c.VolumeResizer.ModifyVolume(volume.VolumeID, modifyType, modifySize, modifyIops, modifyThroughput) if err != nil { errors = append(errors, fmt.Sprintf("modify failed: %v, showing current EBS values: volume-id=%s size=%d iops=%d throughput=%d", err, volume.VolumeID, volume.Size, volume.Iops, volume.Throughput)) @@ -453,47 +440,3 @@ func getPodNameFromPersistentVolume(pv *v1.PersistentVolume) *spec.NamespacedNam func quantityToGigabyte(q resource.Quantity) int64 { return q.ScaledValue(0) / (1 * constants.Gigabyte) } - -func (c *Cluster) executeEBSMigration() error { - pvs, err := c.listPersistentVolumes() - if err != nil { - return fmt.Errorf("could not list persistent volumes: %v", err) - } - if len(pvs) == 0 { - c.logger.Warningf("no persistent volumes found - skipping EBS migration") - return nil - } - c.logger.Debugf("found %d volumes, size of known volumes %d", len(pvs), len(c.EBSVolumes)) - - if len(pvs) == len(c.EBSVolumes) { - hasGp2 := false - for _, v := range c.EBSVolumes { - if v.VolumeType == "gp2" { - hasGp2 = true - } - } - - if !hasGp2 { - c.logger.Debugf("no EBS gp2 volumes left to migrate") - return nil - } - } - - var i3000 int64 = 3000 - var i125 int64 = 125 - - for _, volume := range c.EBSVolumes { - 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, aws.String("gp3"), &volume.Size, &i3000, &i125) - if nil != err { - c.logger.Warningf("modifying volume %s failed: %v", volume.VolumeID, err) - } - } else { - c.logger.Debugf("skipping EBS volume %s to type gp3 migration (%d)", volume.VolumeID, volume.Size) - } - c.EBSVolumes[volume.VolumeID] = volume - } - - return nil -} diff --git a/pkg/cluster/volumes_test.go b/pkg/cluster/volumes_test.go index d6472539b..1f648712b 100644 --- a/pkg/cluster/volumes_test.go +++ b/pkg/cluster/volumes_test.go @@ -179,64 +179,6 @@ func CreatePVCs(namespace string, clusterName string, labels labels.Set, n int, return pvcList } -func TestMigrateEBS(t *testing.T) { - client, _ := newFakeK8sPVCclient() - clusterName := "acid-test-cluster" - namespace := "default" - - // new cluster with pvc storage resize mode and configured labels - var cluster = New( - Config{ - OpConfig: config.Config{ - Resources: config.Resources{ - ClusterLabels: map[string]string{"application": "spilo"}, - ClusterNameLabel: "cluster-name", - }, - StorageResizeMode: "pvc", - EnableEBSGp3Migration: true, - EnableEBSGp3MigrationMaxSize: 1000, - }, - }, client, acidv1.Postgresql{}, logger, eventRecorder) - cluster.Spec.Volume.Size = "1Gi" - - // set metadata, so that labels will get correct values - cluster.Name = clusterName - cluster.Namespace = namespace - filterLabels := cluster.labelsSet(false) - - testVolumes := []testVolume{testVol, testVol} - - initTestVolumesAndPods(cluster.KubeClient, namespace, clusterName, filterLabels, testVolumes) - - ctrl := gomock.NewController(t) - defer ctrl.Finish() - - resizer := mocks.NewMockVolumeResizer(ctrl) - - resizer.EXPECT().ExtractVolumeID(gomock.Eq("aws://eu-central-1b/ebs-volume-1")).Return("ebs-volume-1", nil) - resizer.EXPECT().ExtractVolumeID(gomock.Eq("aws://eu-central-1b/ebs-volume-2")).Return("ebs-volume-2", nil) - - resizer.EXPECT().GetProviderVolumeID(gomock.Any()). - DoAndReturn(func(pv *v1.PersistentVolume) (string, error) { - return resizer.ExtractVolumeID(pv.Spec.AWSElasticBlockStore.VolumeID) - }). - Times(2) - - resizer.EXPECT().DescribeVolumes(gomock.Eq([]string{"ebs-volume-1", "ebs-volume-2"})).Return( - []volumes.VolumeProperties{ - {VolumeID: "ebs-volume-1", VolumeType: "gp2", Size: 100}, - {VolumeID: "ebs-volume-2", VolumeType: "gp3", Size: 100}}, nil) - - // expect only gp2 volume to be modified - resizer.EXPECT().ModifyVolume(gomock.Eq("ebs-volume-1"), gomock.Eq(aws.String("gp3")), gomock.Any(), gomock.Any(), gomock.Any()).Return(nil) - - cluster.VolumeResizer = resizer - err := cluster.populateVolumeMetaData() - assert.NoError(t, err) - err = cluster.executeEBSMigration() - assert.NoError(t, err) -} - func initTestVolumesAndPods(client k8sutil.KubernetesClient, namespace, clustername string, labels labels.Set, volumes []testVolume) { i := 0 for _, v := range volumes { @@ -287,7 +229,7 @@ func initTestVolumesAndPods(client k8sutil.KubernetesClient, namespace, clustern } } -func TestMigrateGp3Support(t *testing.T) { +func TestGp2Gp3Migration(t *testing.T) { client, _ := newFakeK8sPVCclient() clusterName := "acid-test-cluster" namespace := "default" @@ -300,73 +242,9 @@ func TestMigrateGp3Support(t *testing.T) { ClusterLabels: map[string]string{"application": "spilo"}, ClusterNameLabel: "cluster-name", }, - StorageResizeMode: "mixed", - EnableEBSGp3Migration: false, - EnableEBSGp3MigrationMaxSize: 1000, + StorageResizeMode: "mixed", }, - }, client, acidv1.Postgresql{}, logger, eventRecorder) - - cluster.Spec.Volume.Size = "150Gi" - cluster.Spec.Volume.Iops = aws.Int64(6000) - cluster.Spec.Volume.Throughput = aws.Int64(275) - - // set metadata, so that labels will get correct values - cluster.Name = clusterName - cluster.Namespace = namespace - filterLabels := cluster.labelsSet(false) - - testVolumes := []testVolume{testVol, testVol, testVol} - - initTestVolumesAndPods(cluster.KubeClient, namespace, clusterName, filterLabels, testVolumes) - - ctrl := gomock.NewController(t) - defer ctrl.Finish() - - resizer := mocks.NewMockVolumeResizer(ctrl) - - resizer.EXPECT().ExtractVolumeID(gomock.Eq("aws://eu-central-1b/ebs-volume-1")).Return("ebs-volume-1", nil) - resizer.EXPECT().ExtractVolumeID(gomock.Eq("aws://eu-central-1b/ebs-volume-2")).Return("ebs-volume-2", nil) - resizer.EXPECT().ExtractVolumeID(gomock.Eq("aws://eu-central-1b/ebs-volume-3")).Return("ebs-volume-3", nil) - - resizer.EXPECT().GetProviderVolumeID(gomock.Any()). - DoAndReturn(func(pv *v1.PersistentVolume) (string, error) { - return resizer.ExtractVolumeID(pv.Spec.AWSElasticBlockStore.VolumeID) - }). - Times(3) - - resizer.EXPECT().DescribeVolumes(gomock.Eq([]string{"ebs-volume-1", "ebs-volume-2", "ebs-volume-3"})).Return( - []volumes.VolumeProperties{ - {VolumeID: "ebs-volume-1", VolumeType: "gp3", Size: 100, Iops: 3000}, - {VolumeID: "ebs-volume-2", VolumeType: "gp3", Size: 105, Iops: 4000}, - {VolumeID: "ebs-volume-3", VolumeType: "gp3", Size: 151, Iops: 6000, Throughput: 275}}, nil) - - // expect only gp2 volume to be modified - resizer.EXPECT().ModifyVolume(gomock.Eq("ebs-volume-1"), gomock.Eq(aws.String("gp3")), gomock.Eq(aws.Int64(150)), gomock.Eq(aws.Int64(6000)), gomock.Eq(aws.Int64(275))).Return(nil) - resizer.EXPECT().ModifyVolume(gomock.Eq("ebs-volume-2"), gomock.Eq(aws.String("gp3")), gomock.Eq(aws.Int64(150)), gomock.Eq(aws.Int64(6000)), gomock.Eq(aws.Int64(275))).Return(nil) - // resizer.EXPECT().ModifyVolume(gomock.Eq("ebs-volume-3"), gomock.Eq(aws.String("gp3")), gomock.Any(), gomock.Any(), gomock.Any()).Return(nil) - - cluster.VolumeResizer = resizer - cluster.syncVolumes() -} - -func TestManualGp2Gp3Support(t *testing.T) { - client, _ := newFakeK8sPVCclient() - clusterName := "acid-test-cluster" - namespace := "default" - - // new cluster with pvc storage resize mode and configured labels - var cluster = New( - Config{ - OpConfig: config.Config{ - Resources: config.Resources{ - ClusterLabels: map[string]string{"application": "spilo"}, - ClusterNameLabel: "cluster-name", - }, - StorageResizeMode: "mixed", - EnableEBSGp3Migration: false, - EnableEBSGp3MigrationMaxSize: 1000, - }, - }, client, acidv1.Postgresql{}, logger, eventRecorder) + }, client, acidv1.Postgresql{Spec: acidv1.PostgresSpec{Volume: acidv1.Volume{VolumeType: "gp3"}}}, logger, eventRecorder) cluster.Spec.Volume.Size = "150Gi" cluster.Spec.Volume.Iops = aws.Int64(6000) @@ -409,7 +287,7 @@ func TestManualGp2Gp3Support(t *testing.T) { cluster.syncVolumes() } -func TestDontTouchType(t *testing.T) { +func TestNoVolumeTypeChange(t *testing.T) { client, _ := newFakeK8sPVCclient() clusterName := "acid-test-cluster" namespace := "default" @@ -422,9 +300,7 @@ func TestDontTouchType(t *testing.T) { ClusterLabels: map[string]string{"application": "spilo"}, ClusterNameLabel: "cluster-name", }, - StorageResizeMode: "mixed", - EnableEBSGp3Migration: false, - EnableEBSGp3MigrationMaxSize: 1000, + StorageResizeMode: "mixed", }, }, client, acidv1.Postgresql{}, logger, eventRecorder) diff --git a/pkg/controller/operator_config.go b/pkg/controller/operator_config.go index 667384e30..0c237e8b4 100644 --- a/pkg/controller/operator_config.go +++ b/pkg/controller/operator_config.go @@ -181,8 +181,6 @@ func (c *Controller) importConfigurationFromCRD(fromCRD *acidv1.OperatorConfigur result.WALAZStorageAccount = fromCRD.AWSGCP.WALAZStorageAccount result.AdditionalSecretMount = fromCRD.AWSGCP.AdditionalSecretMount result.AdditionalSecretMountPath = fromCRD.AWSGCP.AdditionalSecretMountPath - result.EnableEBSGp3Migration = fromCRD.AWSGCP.EnableEBSGp3Migration - result.EnableEBSGp3MigrationMaxSize = util.CoalesceInt64(fromCRD.AWSGCP.EnableEBSGp3MigrationMaxSize, 1000) // logical backup config result.LogicalBackupSchedule = util.Coalesce(fromCRD.LogicalBackup.Schedule, "30 00 * * *") diff --git a/pkg/util/config/config.go b/pkg/util/config/config.go index 95324a747..538d44034 100644 --- a/pkg/util/config/config.go +++ b/pkg/util/config/config.go @@ -200,8 +200,6 @@ type Config struct { WALAZStorageAccount string `name:"wal_az_storage_account"` AdditionalSecretMount string `name:"additional_secret_mount"` AdditionalSecretMountPath string `name:"additional_secret_mount_path"` - EnableEBSGp3Migration bool `name:"enable_ebs_gp3_migration" default:"false"` - EnableEBSGp3MigrationMaxSize int64 `name:"enable_ebs_gp3_migration_max_size" default:"1000"` DebugLogging bool `name:"debug_logging" default:"true"` EnableDBAccess bool `name:"enable_database_access" default:"true"` EnableTeamsAPI bool `name:"enable_teams_api" default:"true"` diff --git a/pkg/util/volumes/ebs.go b/pkg/util/volumes/ebs.go index 212ee8ac4..49a4d5efa 100644 --- a/pkg/util/volumes/ebs.go +++ b/pkg/util/volumes/ebs.go @@ -89,14 +89,14 @@ func (r *EBSVolumeResizer) DescribeVolumes(volumeIds []string) ([]VolumeProperti } for _, v := range volumeOutput.Volumes { - switch v.VolumeType { - case "gp3": - p = append(p, VolumeProperties{VolumeID: *v.VolumeId, Size: int64(*v.Size), VolumeType: string(v.VolumeType), Iops: int64(*v.Iops), Throughput: int64(*v.Throughput)}) - case "gp2": - p = append(p, VolumeProperties{VolumeID: *v.VolumeId, Size: int64(*v.Size), VolumeType: string(v.VolumeType)}) - default: - return nil, fmt.Errorf("discovered unexpected volume type %s %s", *v.VolumeId, v.VolumeType) + vp := VolumeProperties{VolumeID: *v.VolumeId, Size: int64(*v.Size), VolumeType: string(v.VolumeType)} + if v.Iops != nil { + vp.Iops = int64(*v.Iops) } + if v.Throughput != nil { + vp.Throughput = int64(*v.Throughput) + } + p = append(p, vp) } return p, nil From d268c589c29df174c7e5bc76976c52c9edc3a384 Mon Sep 17 00:00:00 2001 From: Felix Kunde Date: Mon, 27 Jul 2026 16:32:22 +0200 Subject: [PATCH 4/4] 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 --- .../templates/deployment.yaml | 4 +-- .../postgres-operator/crds/postgresqls.yaml | 6 ++-- docs/reference/cluster_manifest.md | 4 +-- manifests/postgresql.crd.yaml | 6 ++-- pkg/apis/acid.zalan.do/v1/postgresql.crd.yaml | 6 ++-- pkg/apis/acid.zalan.do/v1/postgresql_type.go | 8 +++-- .../acid.zalan.do/v1/zz_generated.deepcopy.go | 4 +-- pkg/cluster/volumes.go | 20 +++++------ pkg/cluster/volumes_test.go | 25 +++++++------ pkg/util/volumes/ebs.go | 35 ++++++------------- pkg/util/volumes/volumes.go | 10 +++--- ui/manifests/deployment.yaml | 4 +-- ui/operator_ui/main.py | 4 +-- ui/run_local.sh | 4 +-- 14 files changed, 67 insertions(+), 73 deletions(-) diff --git a/charts/postgres-operator-ui/templates/deployment.yaml b/charts/postgres-operator-ui/templates/deployment.yaml index c8797e42e..d4a2a88b8 100644 --- a/charts/postgres-operator-ui/templates/deployment.yaml +++ b/charts/postgres-operator-ui/templates/deployment.yaml @@ -81,8 +81,8 @@ spec: "cost_memory": 0.014375, "free_iops": 3000, "free_throughput": 125, - "limit_iops": 16000, - "limit_throughput": 1000, + "limit_iops": 80000, + "limit_throughput": 2000, "postgresql_versions": [ "18", "17", diff --git a/charts/postgres-operator/crds/postgresqls.yaml b/charts/postgres-operator/crds/postgresqls.yaml index 0e3558638..f3dcbab59 100644 --- a/charts/postgres-operator/crds/postgresqls.yaml +++ b/charts/postgres-operator/crds/postgresqls.yaml @@ -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 diff --git a/docs/reference/cluster_manifest.md b/docs/reference/cluster_manifest.md index 0717e411f..7dddd5951 100644 --- a/docs/reference/cluster_manifest.md +++ b/docs/reference/cluster_manifest.md @@ -554,11 +554,11 @@ properties of the persistent storage that stores Postgres data. * **iops** When running the operator on AWS the latest generation of EBS volumes (`gp3`) - allows for configuring the number of IOPS. Maximum is 16000. Optional. + allows for configuring the number of IOPS. Maximum is 80000. Optional. * **throughput** When running the operator on AWS the latest generation of EBS volumes (`gp3`) - allows for configuring the throughput in MB/s. Maximum is 1000. Optional. + allows for configuring the throughput in MB/s. Maximum is 2000. Optional. * **selector** A label query over PVs to consider for binding. See the [Kubernetes diff --git a/manifests/postgresql.crd.yaml b/manifests/postgresql.crd.yaml index 0e3558638..f3dcbab59 100644 --- a/manifests/postgresql.crd.yaml +++ b/manifests/postgresql.crd.yaml @@ -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 diff --git a/pkg/apis/acid.zalan.do/v1/postgresql.crd.yaml b/pkg/apis/acid.zalan.do/v1/postgresql.crd.yaml index 0e3558638..f3dcbab59 100644 --- a/pkg/apis/acid.zalan.do/v1/postgresql.crd.yaml +++ b/pkg/apis/acid.zalan.do/v1/postgresql.crd.yaml @@ -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 diff --git a/pkg/apis/acid.zalan.do/v1/postgresql_type.go b/pkg/apis/acid.zalan.do/v1/postgresql_type.go index a03bb13cc..2ea8c6ba8 100644 --- a/pkg/apis/acid.zalan.do/v1/postgresql_type.go +++ b/pkg/apis/acid.zalan.do/v1/postgresql_type.go @@ -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 diff --git a/pkg/apis/acid.zalan.do/v1/zz_generated.deepcopy.go b/pkg/apis/acid.zalan.do/v1/zz_generated.deepcopy.go index 60003adfa..2a3fefd00 100644 --- a/pkg/apis/acid.zalan.do/v1/zz_generated.deepcopy.go +++ b/pkg/apis/acid.zalan.do/v1/zz_generated.deepcopy.go @@ -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 diff --git a/pkg/cluster/volumes.go b/pkg/cluster/volumes.go index c1762a073..e4451a12c 100644 --- a/pkg/cluster/volumes.go +++ b/pkg/cluster/volumes.go @@ -81,24 +81,24 @@ func (c *Cluster) syncUnderlyingEBSVolume() error { errors := make([]string, 0) for _, volume := range c.EBSVolumes { - var modifyIops *int64 - var modifyThroughput *int64 - var modifySize *int64 + var modifyIops *int32 + var modifyThroughput *int32 + var modifySize *int32 var modifyType *string - if targetValue.Iops != nil && *targetValue.Iops >= int64(3000) { - if volume.Iops != int64(*targetValue.Iops) { + if targetValue.Iops != nil && *targetValue.Iops >= int32(3000) { + if volume.Iops != int32(*targetValue.Iops) { modifyIops = targetValue.Iops } } - if targetValue.Throughput != nil && *targetValue.Throughput >= int64(125) { - if volume.Throughput != int64(*targetValue.Throughput) { + if targetValue.Throughput != nil && *targetValue.Throughput >= int32(125) { + if volume.Throughput != int32(*targetValue.Throughput) { modifyThroughput = targetValue.Throughput } } - if targetSize > int64(volume.Size) { + if targetSize > volume.Size { modifySize = &targetSize } @@ -437,6 +437,6 @@ func getPodNameFromPersistentVolume(pv *v1.PersistentVolume) *spec.NamespacedNam return &spec.NamespacedName{Namespace: namespace, Name: name} } -func quantityToGigabyte(q resource.Quantity) int64 { - return q.ScaledValue(0) / (1 * constants.Gigabyte) +func quantityToGigabyte(q resource.Quantity) int32 { + return int32(q.ScaledValue(0) / (1 * constants.Gigabyte)) } diff --git a/pkg/cluster/volumes_test.go b/pkg/cluster/volumes_test.go index 1f648712b..51ac92e06 100644 --- a/pkg/cluster/volumes_test.go +++ b/pkg/cluster/volumes_test.go @@ -13,7 +13,6 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" "github.com/golang/mock/gomock" - "github.com/stretchr/testify/assert" "github.com/zalando/postgres-operator/mocks" acidv1 "github.com/zalando/postgres-operator/pkg/apis/acid.zalan.do/v1" @@ -25,9 +24,9 @@ import ( ) type testVolume struct { - size int64 - iops int64 - throughtput int64 + size int32 + iops int32 + throughtput int32 volType string } @@ -121,7 +120,7 @@ func TestQuantityToGigabyte(t *testing.T) { tests := []struct { name string quantityStr string - expected int64 + expected int32 }{ { "test with 1Gi", @@ -131,12 +130,12 @@ func TestQuantityToGigabyte(t *testing.T) { { "test with float", "1.5Gi", - int64(1), + int32(1), }, { "test with 1000Mi", "1000Mi", - int64(0), + int32(0), }, } @@ -247,8 +246,8 @@ func TestGp2Gp3Migration(t *testing.T) { }, client, acidv1.Postgresql{Spec: acidv1.PostgresSpec{Volume: acidv1.Volume{VolumeType: "gp3"}}}, logger, eventRecorder) cluster.Spec.Volume.Size = "150Gi" - cluster.Spec.Volume.Iops = aws.Int64(6000) - cluster.Spec.Volume.Throughput = aws.Int64(275) + cluster.Spec.Volume.Iops = aws.Int32(6000) + cluster.Spec.Volume.Throughput = aws.Int32(275) // set metadata, so that labels will get correct values cluster.Name = clusterName @@ -280,8 +279,8 @@ func TestGp2Gp3Migration(t *testing.T) { }, nil) // expect only gp2 volume to be modified - resizer.EXPECT().ModifyVolume(gomock.Eq("ebs-volume-1"), gomock.Eq(aws.String("gp3")), gomock.Nil(), gomock.Eq(aws.Int64(6000)), gomock.Eq(aws.Int64(275))).Return(nil) - resizer.EXPECT().ModifyVolume(gomock.Eq("ebs-volume-2"), gomock.Eq(aws.String("gp3")), gomock.Nil(), gomock.Eq(aws.Int64(6000)), gomock.Eq(aws.Int64(275))).Return(nil) + resizer.EXPECT().ModifyVolume(gomock.Eq("ebs-volume-1"), gomock.Eq(aws.String("gp3")), gomock.Nil(), gomock.Eq(aws.Int32(6000)), gomock.Eq(aws.Int32(275))).Return(nil) + resizer.EXPECT().ModifyVolume(gomock.Eq("ebs-volume-2"), gomock.Eq(aws.String("gp3")), gomock.Nil(), gomock.Eq(aws.Int32(6000)), gomock.Eq(aws.Int32(275))).Return(nil) cluster.VolumeResizer = resizer cluster.syncVolumes() @@ -343,8 +342,8 @@ func TestNoVolumeTypeChange(t *testing.T) { }, nil) // expect only gp2 volume to be modified - resizer.EXPECT().ModifyVolume(gomock.Eq("ebs-volume-1"), gomock.Nil(), gomock.Eq(aws.Int64(177)), gomock.Nil(), gomock.Nil()).Return(nil) - resizer.EXPECT().ModifyVolume(gomock.Eq("ebs-volume-2"), gomock.Nil(), gomock.Eq(aws.Int64(177)), gomock.Nil(), gomock.Nil()).Return(nil) + resizer.EXPECT().ModifyVolume(gomock.Eq("ebs-volume-1"), gomock.Nil(), gomock.Eq(aws.Int32(177)), gomock.Nil(), gomock.Nil()).Return(nil) + resizer.EXPECT().ModifyVolume(gomock.Eq("ebs-volume-2"), gomock.Nil(), gomock.Eq(aws.Int32(177)), gomock.Nil(), gomock.Nil()).Return(nil) cluster.VolumeResizer = resizer cluster.syncVolumes() diff --git a/pkg/util/volumes/ebs.go b/pkg/util/volumes/ebs.go index 49a4d5efa..7962a50b3 100644 --- a/pkg/util/volumes/ebs.go +++ b/pkg/util/volumes/ebs.go @@ -89,12 +89,12 @@ func (r *EBSVolumeResizer) DescribeVolumes(volumeIds []string) ([]VolumeProperti } for _, v := range volumeOutput.Volumes { - vp := VolumeProperties{VolumeID: *v.VolumeId, Size: int64(*v.Size), VolumeType: string(v.VolumeType)} + vp := VolumeProperties{VolumeID: *v.VolumeId, Size: int32(*v.Size), VolumeType: string(v.VolumeType)} if v.Iops != nil { - vp.Iops = int64(*v.Iops) + vp.Iops = int32(*v.Iops) } if v.Throughput != nil { - vp.Throughput = int64(*v.Throughput) + vp.Throughput = int32(*v.Throughput) } p = append(p, vp) } @@ -103,7 +103,7 @@ func (r *EBSVolumeResizer) DescribeVolumes(volumeIds []string) ([]VolumeProperti } // ResizeVolume actually calls AWS API to resize the EBS volume if necessary. -func (r *EBSVolumeResizer) ResizeVolume(volumeID string, newSize int64) error { +func (r *EBSVolumeResizer) ResizeVolume(volumeID string, newSize int32) error { /* first check if the volume is already of a requested size */ volumeOutput, err := r.connection.DescribeVolumes(context.TODO(), &ec2.DescribeVolumesInput{VolumeIds: []string{volumeID}}) if err != nil { @@ -113,12 +113,11 @@ func (r *EBSVolumeResizer) ResizeVolume(volumeID string, newSize int64) error { if *vol.VolumeId != volumeID { return fmt.Errorf("describe volume %q returned information about a non-matching volume %q", volumeID, *vol.VolumeId) } - sizeInt32 := int32(newSize) - if *vol.Size == sizeInt32 { + if *vol.Size == newSize { // nothing to do return nil } - input := ec2.ModifyVolumeInput{Size: &sizeInt32, VolumeId: &volumeID} + input := ec2.ModifyVolumeInput{Size: &newSize, VolumeId: &volumeID} output, err := r.connection.ModifyVolume(context.TODO(), &input) if err != nil { return fmt.Errorf("could not modify persistent volume: %v", err) @@ -154,28 +153,16 @@ func (r *EBSVolumeResizer) ResizeVolume(volumeID string, newSize int64) error { } // ModifyVolume Modify EBS volume -func (r *EBSVolumeResizer) ModifyVolume(volumeID string, newType *string, newSize *int64, iops *int64, throughput *int64) error { - var sizeInt32 *int32 - var iopsInt32 *int32 - var throughputInt32 *int32 - - input := ec2.ModifyVolumeInput{ - VolumeId: &volumeID, - } +func (r *EBSVolumeResizer) ModifyVolume(volumeID string, newType *string, newSize *int32, iops *int32, throughput *int32) error { + input := ec2.ModifyVolumeInput{VolumeId: &volumeID} if newSize != nil { - s := int32(*newSize) - sizeInt32 = &s - input.Size = sizeInt32 + input.Size = newSize } if iops != nil { - i := int32(*iops) - iopsInt32 = &i - input.Iops = iopsInt32 + input.Iops = iops } if throughput != nil { - t := int32(*throughput) - throughputInt32 = &t - input.Throughput = throughputInt32 + input.Throughput = throughput } if newType != nil { input.VolumeType = types.VolumeType(*newType) diff --git a/pkg/util/volumes/volumes.go b/pkg/util/volumes/volumes.go index 32f68c65e..501215b41 100644 --- a/pkg/util/volumes/volumes.go +++ b/pkg/util/volumes/volumes.go @@ -8,9 +8,9 @@ import v1 "k8s.io/api/core/v1" type VolumeProperties struct { VolumeID string VolumeType string - Size int64 - Iops int64 - Throughput int64 + Size int32 + Iops int32 + Throughput int32 } // VolumeResizer defines the set of methods used to implememnt provider-specific resizing of persistent volumes. @@ -20,8 +20,8 @@ type VolumeResizer interface { VolumeBelongsToProvider(pv *v1.PersistentVolume) bool GetProviderVolumeID(pv *v1.PersistentVolume) (string, error) ExtractVolumeID(volumeID string) (string, error) - ResizeVolume(providerVolumeID string, newSize int64) error - ModifyVolume(providerVolumeID string, newType *string, newSize *int64, iops *int64, throughput *int64) error + ResizeVolume(providerVolumeID string, newSize int32) error + ModifyVolume(providerVolumeID string, newType *string, newSize *int32, iops *int32, throughput *int32) error DisconnectFromProvider() error DescribeVolumes(providerVolumesID []string) ([]VolumeProperties, error) } diff --git a/ui/manifests/deployment.yaml b/ui/manifests/deployment.yaml index e19a850b8..eb48d9605 100644 --- a/ui/manifests/deployment.yaml +++ b/ui/manifests/deployment.yaml @@ -70,8 +70,8 @@ spec: "cost_memory": 0.014375, "free_iops": 3000, "free_throughput": 125, - "limit_iops": 16000, - "limit_throughput": 1000, + "limit_iops": 80000, + "limit_throughput": 2000, "postgresql_versions": [ "18", "17", diff --git a/ui/operator_ui/main.py b/ui/operator_ui/main.py index c91450d4c..469fe66ed 100644 --- a/ui/operator_ui/main.py +++ b/ui/operator_ui/main.py @@ -86,9 +86,9 @@ COST_ELB = float(getenv('COST_ELB', 0.03)) # per hour # maximum and limitation of IOPS and throughput FREE_IOPS = float(getenv('FREE_IOPS', 3000)) -LIMIT_IOPS = float(getenv('LIMIT_IOPS', 16000)) +LIMIT_IOPS = float(getenv('LIMIT_IOPS', 80000)) FREE_THROUGHPUT = float(getenv('FREE_THROUGHPUT', 125)) -LIMIT_THROUGHPUT = float(getenv('LIMIT_THROUGHPUT', 1000)) +LIMIT_THROUGHPUT = float(getenv('LIMIT_THROUGHPUT', 2000)) # get the default value of core and memory DEFAULT_MEMORY = getenv('DEFAULT_MEMORY', '300Mi') DEFAULT_MEMORY_LIMIT = getenv('DEFAULT_MEMORY_LIMIT', '300Mi') diff --git a/ui/run_local.sh b/ui/run_local.sh index 59729a92a..13d8f053a 100755 --- a/ui/run_local.sh +++ b/ui/run_local.sh @@ -28,8 +28,8 @@ default_operator_ui_config='{ "cost_memory": 0.014375, "free_iops": 3000, "free_throughput": 125, - "limit_iops": 16000, - "limit_throughput": 1000, + "limit_iops": 80000, + "limit_throughput": 2000, "postgresql_versions": [ "18", "17",