feat: [CPCAP-9364] automatic pvc extension - #584
Conversation
| return restartRequired, err | ||
| } | ||
|
|
||
| func (rm *ResourceManager) WaitForPodDeletion(podName string, timeout time.Duration) error { |
There was a problem hiding this comment.
We have util.WaitDeletePod method
| return err | ||
| } | ||
|
|
||
| time.Sleep(10 * time.Second) |
| return err | ||
| } | ||
|
|
||
| time.Sleep(10 * time.Second) |
There was a problem hiding this comment.
It gives the storage system a few seconds to finish releasing the disk before the pod uses it again.
| } | ||
| } | ||
|
|
||
| time.Sleep(10 * time.Second) |
There was a problem hiding this comment.
Please describe every provided sleep
There was a problem hiding this comment.
It gives the storage system a few seconds to finish releasing the disk before the pod uses it again.
| return err | ||
| } | ||
|
|
||
| resp, err := http.Post(patroniURL+"switchover", "application/json", bytes.NewBuffer(data)) |
There was a problem hiding this comment.
Please use patroniPost method here
| logger.Info(fmt.Sprintf("Restarting Backup Daemon deployment %s to complete PVC resize, attempt %d, waiting %s", backupDaemonDeployment.Name, attempt, delay)) | ||
|
|
||
| backupPods, err := r.helper.GetNamespacePodListBySelectors( | ||
| map[string]string{"app": "postgres-backup-daemon"}, |
There was a problem hiding this comment.
Let's use deployment.BackupDaemonLabels
| return fmt.Errorf("timeout waiting for Backup Daemon PVC resize") | ||
| } | ||
|
|
||
| if err := r.helper.CreateOrUpdateDeploymentForce(backupDaemonDeployment, true); err != nil { |
There was a problem hiding this comment.
We pass waitForStability argument as true
Will this method wait for pod to be healthy
There was a problem hiding this comment.
Yes, since inside of this function we are checking with util.WaitForStabilityDepl that wait for stability
| } | ||
| patroniPvcs = append(patroniPvcs, storage.NewPvc(fmt.Sprintf("%s-wals-data-%v", opUtil.GetPatroniClusterName(cr.Spec.Patroni.ClusterName), deploymentIdx), patroniSpec.PgWalStorage, deploymentIdx)) | ||
| } | ||
| if cr.Spec.PgBackRest != nil && strings.ToLower(cr.Spec.PgBackRest.RepoType) == "rwx" { |
There was a problem hiding this comment.
Please roll back this section removal as pgbackrest PVC must be created as before
No description provided.