Skip to content
This repository was archived by the owner on Mar 26, 2025. It is now read-only.

Commit 4288310

Browse files
committed
Fix panic when pvc size is updated externally
1 parent 14b3920 commit 4288310

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/resources/kafka/kafka.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,8 @@ func (r *Reconciler) reconcileKafkaPvc(log logr.Logger, brokersDesiredPvcs map[s
804804
}
805805

806806
if isDesiredStorageValueInvalid(desiredPvc, currentPvc) {
807-
return errorfactory.New(errorfactory.InternalError{}, nil, "one can not reduce the size of a PVC", "kind", desiredType)
807+
return errorfactory.New(errorfactory.InternalError{}, errors.New("could not modify pvc size"),
808+
"one can not reduce the size of a PVC", "kind", desiredType)
808809
}
809810

810811
resReq := desiredPvc.Spec.Resources.Requests

0 commit comments

Comments
 (0)