We were assuming a default storage class is always set, but DOKS users can change that in a cluster now. If old PVCs did not specify a storage class name and default storage class existed, that'd have been used to create the PV. However, old PVCs do not complain if default storage class gets unset later on. This caused the check to panic for such old PVCs.
Desc:
We were assuming a default storage class is always set, but DOKS users can change that in a cluster now. If old PVCs did not specify a storage class name and default storage class existed, that'd have been used to create the PV. However, old PVCs do not complain if default storage class gets unset later on. This caused the check to panic for such old PVCs.