mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 04:06:03 +00:00
process pvc watch deletion event miss in expand-controller
This commit is contained in:
parent
18758f502c
commit
e6567108bd
@ -162,9 +162,17 @@ func (expc *expandController) Run(stopCh <-chan struct{}) {
|
||||
|
||||
func (expc *expandController) deletePVC(obj interface{}) {
|
||||
pvc, ok := obj.(*v1.PersistentVolumeClaim)
|
||||
|
||||
if pvc == nil || !ok {
|
||||
return
|
||||
if !ok {
|
||||
tombstone, ok := obj.(kcache.DeletedFinalStateUnknown)
|
||||
if !ok {
|
||||
runtime.HandleError(fmt.Errorf("couldn't get object from tombstone %+v", obj))
|
||||
return
|
||||
}
|
||||
pvc, ok = tombstone.Obj.(*v1.PersistentVolumeClaim)
|
||||
if !ok {
|
||||
runtime.HandleError(fmt.Errorf("tombstone contained object that is not a pvc %#v", obj))
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
expc.resizeMap.DeletePVC(pvc)
|
||||
|
Loading…
Reference in New Issue
Block a user