-
Notifications
You must be signed in to change notification settings - Fork 1k
Fix 1641 make k8s discovery cacheable #2070
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
Fix 1641 make k8s discovery cacheable #2070
Conversation
Signed-off-by: wind57 <[email protected]>
Signed-off-by: wind57 <[email protected]>
Signed-off-by: wind57 <[email protected]>
| - Since http discovery has _two_ components : server and client, we strongly recommend to align versions between them, otherwise things might not work. | ||
| - If you decide to disable catalog watcher, you need to disable it in both server and client. | ||
|
|
||
| Since version `5.0.0`, there is the possibility to cache the responses from a discovery client (we do it via the `@Cacheable` annotation). There are two properties to keep in mind here: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ryanjbaxter is this OK documentation wise to you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would state that by default the non-cacheable versions are enabled and to enable the cachable versions you need to enable one or the other of the below properties.
Signed-off-by: wind57 <[email protected]>
| KubernetesDiscoveryPropertiesAutoConfiguration.class, | ||
| KubernetesClientDiscoveryClientSpelAutoConfiguration.class, | ||
| KubernetesClientInformerReactiveDiscoveryClientAutoConfiguration.class }) | ||
| class KubernetesClientInformerReactiveHealthAutoConfiguration { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it turns out that @ConditionalOnBean does not work the way I thought it does, so we need proper auto-configurations for the reactive health, that would have @@AutoConfigureAfter(KubernetesClientDiscoveryClientSpelAutoConfiguration)
essentially let the clients be created first, then the beans for the health
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've done this for all 3 clients
Signed-off-by: wind57 <[email protected]>
Signed-off-by: wind57 <[email protected]>
|
@ryanjbaxter ready. I don't have anything else that is breaking. thank you. |
No description provided.