do not call EBS api when there are no pvs (#1851)

* do not call EBS api when there are no pvs
* no extra aws api call in executeEBSMigration, operate on fetched cluster.EBSVolumes
This commit is contained in:
Felix Kunde
2022-04-20 12:12:02 +02:00
committed by GitHub
parent eecd13169c
commit 532772c5cd
4 changed files with 18 additions and 30 deletions
-1
View File
@@ -149,7 +149,6 @@ func New(cfg Config, kubeClient k8sutil.KubernetesClient, pgSpec acidv1.Postgres
cluster.EBSVolumes = make(map[string]volumes.VolumeProperties)
if cfg.OpConfig.StorageResizeMode != "pvc" || cfg.OpConfig.EnableEBSGp3Migration {
cluster.VolumeResizer = &volumes.EBSVolumeResizer{AWSRegion: cfg.OpConfig.AWSRegion}
}
return cluster