From c1daf5b00c6e420faa0ccfb157ac668886e0f3ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Mu=C3=9Fler?= Date: Wed, 30 Jun 2021 14:09:56 +0200 Subject: [PATCH 1/2] Do not modify if values are below gp3 minimum throughput. --- pkg/cluster/volumes.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/cluster/volumes.go b/pkg/cluster/volumes.go index 9a41f5f05..4352c85da 100644 --- a/pkg/cluster/volumes.go +++ b/pkg/cluster/volumes.go @@ -96,13 +96,13 @@ func (c *Cluster) syncUnderlyingEBSVolume() error { var modifySize *int64 var modifyType *string - if targetValue.Iops != nil { + if targetValue.Iops != nil && targetValue.Iops >= 3000 { if volume.Iops != *targetValue.Iops { modifyIops = targetValue.Iops } } - if targetValue.Throughput != nil { + if targetValue.Throughput != nil && targetValue.Throughput >= 125{ if volume.Throughput != *targetValue.Throughput { modifyThroughput = targetValue.Throughput } From 9e832dc1e3009d3c0b889f616986de0e6c7b1946 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Mu=C3=9Fler?= Date: Wed, 30 Jun 2021 14:17:47 +0200 Subject: [PATCH 2/2] Fix pointers ... :D --- pkg/cluster/volumes.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/cluster/volumes.go b/pkg/cluster/volumes.go index 4352c85da..5837375da 100644 --- a/pkg/cluster/volumes.go +++ b/pkg/cluster/volumes.go @@ -96,13 +96,13 @@ func (c *Cluster) syncUnderlyingEBSVolume() error { var modifySize *int64 var modifyType *string - if targetValue.Iops != nil && targetValue.Iops >= 3000 { + if targetValue.Iops != nil && *targetValue.Iops >= int64(3000) { if volume.Iops != *targetValue.Iops { modifyIops = targetValue.Iops } } - if targetValue.Throughput != nil && targetValue.Throughput >= 125{ + if targetValue.Throughput != nil && *targetValue.Throughput >= int64(125) { if volume.Throughput != *targetValue.Throughput { modifyThroughput = targetValue.Throughput }