Skip to content

Conversation

@wind57
Copy link
Contributor

@wind57 wind57 commented Oct 13, 2025

No description provided.

- 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:
Copy link
Contributor Author

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?

Copy link
Contributor

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 {
Copy link
Contributor Author

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

Copy link
Contributor Author

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]>
@wind57 wind57 marked this pull request as ready for review October 14, 2025 20:03
@wind57
Copy link
Contributor Author

wind57 commented Oct 14, 2025

@ryanjbaxter ready. I don't have anything else that is breaking. thank you.

@ryanjbaxter ryanjbaxter added this to the 5.0.0-M4 milestone Oct 14, 2025
@ryanjbaxter ryanjbaxter linked an issue Oct 14, 2025 that may be closed by this pull request
@ryanjbaxter ryanjbaxter merged commit 8224009 into spring-cloud:main Oct 14, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

KubernetesReactiveDiscoveryClient cache configuration issues

3 participants