mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-11-01 22:34:14 +00:00
When we create a PV, we should created it withoud Spec.ClaimRef.UID. In rare cases, when 'PV added' event with UID is processed before 'PVC added' (created by for loop few lines above), the controller does not know a PVC with this UID and considers the PV as released. Reclaim policy is then executed and the PV is deleted and it's never bound. With UID="", the controller waits for the PVC to get created and binds it.