PR feedback

This commit is contained in:
Rahul Rangith
2022-12-01 15:26:36 -05:00
parent e6a90aa48a
commit 3cf636b22e
3 changed files with 14 additions and 7 deletions

View File

@@ -453,9 +453,16 @@ func (ssc *defaultStatefulSetControl) updateStatefulSet(
set.Namespace,
set.Name,
replicas[i].Name)
if err := ssc.podControl.CreatePersistentVolumeClaims(set, replicas[i]); err != nil {
if err := ssc.podControl.createPersistentVolumeClaims(set, replicas[i]); err != nil {
return &status, err
}
if utilfeature.DefaultFeatureGate.Enabled(features.StatefulSetAutoDeletePVC) {
// Set PVC policy as much as is possible at this point.
if err := ssc.podControl.UpdatePodClaimForRetentionPolicy(set, replicas[i]); err != nil {
ssc.podControl.recordPodEvent("update", set, replicas[i], err)
return &status, err
}
}
}
// If we find a Pod that is currently terminating, we must wait until graceful deletion
// completes before we continue to make progress.