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 -1
View File
@@ -69,7 +69,7 @@ func (c *Cluster) Sync(newSpec *acidv1.Postgresql) error {
return err
}
if c.OpConfig.EnableEBSGp3Migration {
if c.OpConfig.EnableEBSGp3Migration && len(c.EBSVolumes) > 0 {
err = c.executeEBSMigration()
if nil != err {
return err