mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-07-18 04:54:54 +00:00
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:
@@ -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, "")
|
||||
|
||||
Reference in New Issue
Block a user