Skip to content
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

Non-caching client #144

Closed
mengqiy opened this issue Sep 14, 2018 · 8 comments
Closed

Non-caching client #144

mengqiy opened this issue Sep 14, 2018 · 8 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.

Comments

@mengqiy
Copy link
Member

mengqiy commented Sep 14, 2018

We already provide a caching client for controller.

As @pwittrock pointed out, we should provide a no caching client. Because if the cache becomes out-of-date, the admission webhook may make wrong decision based on stale objects. A no-caching client may be helpful in this case.

@mengqiy mengqiy added the kind/feature Categorizes issue or PR as related to a new feature. label Sep 14, 2018
@mengqiy
Copy link
Member Author

mengqiy commented Sep 14, 2018

cc: @DirectXMan12 @droot

@DirectXMan12
Copy link
Contributor

it's possible to get a non-caching client, just not easy. We should have a convenience function to make it easy.

@mengqiy mengqiy changed the title No-caching client Non-caching client Oct 18, 2018
@mengqiy
Copy link
Member Author

mengqiy commented Oct 18, 2018

Another scenario to use a non-caching client is that people may want to avoid having a huge cache locally by using a non-caching client.

@M00nF1sh
Copy link

also here: #180

I suggest

  1. using manager.GetCache for call that need caching(we can delegate to direct read for unstructured resources)
  2. make manager.GetClient always read without caching.

@zjj2wry
Copy link

zjj2wry commented Nov 29, 2018

I encountered the same problem when using v0.1.1, the client also gets data from the cache is confusing

https://github.com/kubernetes-sigs/controller-runtime/blob/v0.1.1/pkg/manager/manager.go#L149

@DirectXMan12
Copy link
Contributor

/priority important-longterm

@k8s-ci-robot k8s-ci-robot added the priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. label Dec 3, 2018
@shawn-hurley
Copy link

@DirectXMan12 I think we can close this with #327

@DirectXMan12
Copy link
Contributor

yep!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
None yet
Development

No branches or pull requests

6 participants