kube-router
kube-router copied to clipboard
Use workqueue
Example: https://github.com/kubernetes/client-go/blob/master/examples/workqueue/main.go
Using workqueue solves a number of subtle bugs in writing controllers. Few important ones are:
- Ensure that one the final state of an object is handled and automatically collapses them into the final state.
- Ensures only one go routine handles an object of a kind at a time.