mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-05 15:36:38 +02:00
respond to review
This commit is contained in:
@@ -679,7 +679,7 @@ func (c *Cluster) Update(oldSpec, newSpec *acidv1.Postgresql) error {
|
||||
}
|
||||
}()
|
||||
|
||||
if c.OpConfig.ShouldDeleteUnusedPVC && oldSpec.Spec.NumberOfInstances > newSpec.Spec.NumberOfInstances {
|
||||
if c.OpConfig.EnableUnusedPVCDeletion && oldSpec.Spec.NumberOfInstances > newSpec.Spec.NumberOfInstances {
|
||||
c.logger.Debug("deleting pvc of shut down pods")
|
||||
|
||||
for i := oldSpec.Spec.NumberOfInstances - 1; i >= newSpec.Spec.NumberOfInstances; i-- {
|
||||
|
||||
+1
-1
@@ -113,7 +113,7 @@ func (c *Cluster) Sync(newSpec *acidv1.Postgresql) error {
|
||||
|
||||
// remove unused PVCs in case deleting them during scale down failed; see Update()
|
||||
// the last pvc stays until the cluster is explicitly deleted as opposed to being scaled down to 0 pods
|
||||
if c.OpConfig.ShouldDeleteUnusedPVC && c.getNumberOfInstances(&c.Spec) > 0 {
|
||||
if c.OpConfig.EnableUnusedPVCDeletion && c.getNumberOfInstances(&c.Spec) > 0 {
|
||||
|
||||
// XXX that also deletes PVC of pods shut down before this change is deployed
|
||||
for i := c.getNumberOfInstances(&c.Spec); ; i++ {
|
||||
|
||||
Reference in New Issue
Block a user