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

Cache correctness investigations #91

Closed
SgtCoDFish opened this issue Jan 10, 2023 · 1 comment · Fixed by #92
Closed

Cache correctness investigations #91

SgtCoDFish opened this issue Jan 10, 2023 · 1 comment · Fixed by #92
Milestone

Comments

@SgtCoDFish
Copy link
Member

In #90 @inteon implemented some changes to help with cache correctness, since trust-manager has to work around some limitations currently present in controller-runtime (see kubernetes-sigs/controller-runtime#1962 which should help).

We believe that PR was an improvement, but there might be other issues that need addressing which Tim is looking into.

It seems like my PR just makes Secrets the same as the other resources, but there is a fix necessary to make everything work as intended (minimal caching etc.).
[and to avoid] duplicate caching (see this comment for more info: https://github.com/kubernetes-sigs/controller-runtime/blob/master/pkg/builder/options.go#L103-L132)
My current hypothesis is that we cache every resource 2 times (one time metadata only and one time fully), I still have to check by running an actual example.

This is a tracking issue for that work, which is likely a sensible prerequisite for a 0.4.0 release.

@SgtCoDFish SgtCoDFish added this to the v0.4.0 milestone Jan 10, 2023
@inteon
Copy link
Member

inteon commented Jan 10, 2023

Here you can see that the "client" in bundle is also backed by a cache
image
So I think this comment is wrong:
image
So, when you make a "Get" request with that client, a new informer is started that will cache all resources of that type.

NOTE: Still not 100% certain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants