Use the following steps to tryout this.
- Create crd and cr
kubectl apply -f resources/api_crd.yaml
kubectl apply -f resources/api_cr.yaml
- Run the informer
go run main.go
- Try Create, Update, delete of Custom Resources and you will see onAdd, onUpdate, onDelete methods will call accordingly.