-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate to FilteredSharedInformer #169
Comments
I started looking at this on friday. Its nice for the kubernikus CRD but its not working for our I'm starting to think that maybe instead of struggling with the |
To make this work we can’t use the custom “kluster” index for the pod informer anymore. We now use the standard PodLister with a label selector instead. This might incour a performance cost but I think its negligible and we only do this in state creating anyway. Manually tested to work. Fixes #169
To make this work we can’t use the custom “kluster” index for the pod informer anymore. We now use the standard PodLister with a label selector instead. This might incour a performance cost but I think its negligible and we only do this in state creating anyway. Manually tested to work. Fixes #169
With
client-go
v6.0.0 there's now aFilteredSharedInformer
that can be scoped to a namespace. This allows us to refactor our own custom filter. There's then also potential for simplifying the controller initialisation.As seen here: https://github.com/sapcc/kubernikus/blob/master/pkg/controller/operator.go#L216-L246
Production Example:
https://github.com/jetstack/cert-manager/blob/b978faa28c9f0fb0414b5d7293fab7bde65bde76/cmd/controller/app/controller.go#L123
See also: http://blog.kubernetes.io/2018/01/introducing-client-go-version-6.html
The text was updated successfully, but these errors were encountered: