-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Deprecate constructor that uses namespace #1285
Deprecate constructor that uses namespace #1285
Conversation
Configure Renovate
@ryanjbaxter one more minor PR before two more far more interesting ones, imho. thank you! |
@@ -85,4 +86,15 @@ public KubernetesInformerReactiveDiscoveryClient kubernetesReactiveDiscoveryClie | |||
serviceLister, endpointsLister, serviceInformer, endpointsInformer, properties); | |||
} | |||
|
|||
@Bean | |||
@ConditionalOnMissingBean | |||
KubernetesInformerReactiveDiscoveryClient kubernetesClientReactiveDiscoveryClient( |
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.
We shouldnt be creating 2 bean instances, we can remove the @Bean
annotation above
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.
there's @ConditionalOnMissingBean
on both of them, so only one will be created. We don't care which one will be created at this point in time, because they do the same thing in their constructors.
Later, in the next major release, I will have a PR that drops all of these deprecations.
Btw, the same situation exists in KubernetesInformerDiscoveryClientAutoConfiguration
(the non-reactive auto-configuration).
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.
Or even better now that I think about your suggestion is to remove the @Bean
in both reactive and non-reactive auto-configurations. This is one nice piece of advice, thank 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.
Exactly
No description provided.