• Kubernetes Submit Queue's avatar
    Merge pull request #35950 from nikhiljindal/nsdelreuse · 821e1712
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue
    
    federation: Refactoring namespaced resources deletion code from kube ns controller and sharing it with fed ns controller
    
    Ref https://github.com/kubernetes/kubernetes/issues/33612
    
    Refactoring code in kube namespace controller to delete all resources in a namespace when the namespace is deleted. Refactored this code into a separate NamespacedResourcesDeleter class and calling it from federation namespace controller.
    This is required for enabling cascading deletion of namespaced resources in federation apiserver.
    Before this PR, we were directly deleting the namespaced resources and assuming that they go away immediately. With cascading deletion, we will have to wait for the corresponding controllers to first delete the resources from underlying clusters and then delete the resource from federation control plane. NamespacedResourcesDeleter has this waiting logic.
    
    cc @kubernetes/sig-federation-misc @caesarxuchao @derekwaynecarr @mwielgus
    821e1712
Name
Last commit
Last update
..
src/k8s.io Loading commit data...
README.md Loading commit data...
copy.sh Loading commit data...
godeps-json-updater.go Loading commit data...
prime-apimachinery.sh Loading commit data...