fixed namespace behavior issue

This commit is contained in:
Safwan
2025-11-25 02:05:41 +05:00
parent 4f8b22e954
commit 1725f17b0b

View File

@@ -201,11 +201,7 @@ func (c *Controller) Update(old interface{}, new interface{}) {
// Delete function to add an object to the queue in case of deleting a resource
func (c *Controller) Delete(old interface{}) {
switch object := old.(type) {
case *v1.Namespace:
c.removeSelectedNamespaceFromCache(*object)
return
case *csiv1.SecretProviderClassPodStatus:
if _, ok := old.(*csiv1.SecretProviderClassPodStatus); ok {
return
}
@@ -218,6 +214,12 @@ func (c *Controller) Delete(old interface{}) {
})
}
}
switch object := old.(type) {
case *v1.Namespace:
c.removeSelectedNamespaceFromCache(*object)
return
}
}
// Run function for controller which handles the queue