mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-04 00:24:59 +00:00
This change makes us use the generic workqueue throughout the project in order to improve type safety and readability of the code. Kubernetes-commit: 6d0ac8c561a7ac66c21e4ee7bd1976c2ecedbf32
Workqueue Example
This example demonstrates how to write a controller which follows the states of watched resources.
It demonstrates how to:
- combine the workqueue with a cache to a full controller
- synchronize the controller on startup
The example is based on https://git.k8s.io/community/contributors/devel/sig-api-machinery/controllers.md.
Running
# if outside of the cluster
go run *.go -kubeconfig=/my/config