Skip to content

Commit e338da4

Browse files
authored
fix checkPVCCondition to compare size (#3427)
1 parent 868c17d commit e338da4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/csi/service/wcpguest/controller_helper.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ func checkPVCCondition(ctx context.Context, pvc *v1.PersistentVolumeClaim,
186186
pvc.Namespace, condition.Type)
187187
if condition.Type == reqCondition {
188188
pvcSize := pvc.Spec.Resources.Requests[v1.ResourceName(v1.ResourceStorage)]
189-
if pvcSize == *reqSize {
189+
if pvcSize.Value() == reqSize.Value() {
190190
log.Infof("PersistentVolumeClaim %s in namespace %s is in %s condition and "+
191191
"its request size is %s", pvc.Name, pvc.Namespace, condition.Type, reqSize.String())
192192
return true

0 commit comments

Comments
 (0)