Fix volume sync order.

This commit is contained in:
Jan Mußler 2021-02-01 13:53:41 +01:00
parent 0cce565b65
commit 0ea5014a00
1 changed files with 5 additions and 4 deletions

View File

@ -53,6 +53,11 @@ func (c *Cluster) Sync(newSpec *acidv1.Postgresql) error {
return 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 {
err = c.executeEBSMigration()
if nil != err {
@ -60,10 +65,6 @@ func (c *Cluster) Sync(newSpec *acidv1.Postgresql) error {
}
}
if err = c.syncVolumes(); err != nil {
return err
}
if err = c.enforceMinResourceLimits(&c.Spec); err != nil {
err = fmt.Errorf("could not enforce minimum resource limits: %v", err)
return err