Merge pull request #134507 from gnufied/automated-cherry-pick-of-#134456-upstream-release-1.34

Automated cherry pick of #134456: With new changes we will also have a VolumeModifying condition
This commit is contained in:
Kubernetes Prow Robot
2025-10-10 08:49:01 -07:00
committed by GitHub

View File

@@ -76,11 +76,16 @@ func WaitForPersistentVolumeClaimModificationFailure(ctx context.Context, c clie
desiredClass := ptr.Deref(claim.Spec.VolumeAttributesClassName, "")
var match = func(claim *v1.PersistentVolumeClaim) bool {
foundErrorCondition := false
for _, condition := range claim.Status.Conditions {
if condition.Type != v1.PersistentVolumeClaimVolumeModifyVolumeError {
return false
if condition.Type == v1.PersistentVolumeClaimVolumeModifyVolumeError {
foundErrorCondition = true
}
}
// if no error found it must be an error
if !foundErrorCondition {
return false
}
// check if claim's current volume attributes class is NOT desired one, and has appropriate ModifyVolumeStatus
currentClass := ptr.Deref(claim.Status.CurrentVolumeAttributesClassName, "")