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

Align fabric8 k8s discovery clients part 5 #1506

Merged

Conversation

wind57
Copy link
Contributor

@wind57 wind57 commented Nov 14, 2023

No description provided.

@@ -57,7 +56,7 @@ class KubernetesClientConfigServerBootstrapper extends KubernetesConfigServerBoo

@Override
public void initialize(BootstrapRegistry registry) {
if (!ClassUtils.isPresent("org.springframework.cloud.config.client.ConfigServerInstanceProvider", null)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this method hasConfigServerInstanceProvider is already present in the base class and it's already doing the same exact check, so just replace with that one

@@ -96,7 +95,7 @@ public List<ServiceInstance> apply(String serviceId, Binder binder, BindHandler
.getInstances(serviceId);
}

protected KubernetesConfigServerInstanceProvider getInstanceProvider(
private KubernetesConfigServerInstanceProvider getInstanceProvider(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

class is final, so protected can be replaced with private

@@ -116,12 +115,12 @@ protected KubernetesConfigServerInstanceProvider getInstanceProvider(

String namespace = getInformerNamespace(kubernetesNamespaceProvider, discoveryProperties);
SharedInformerFactory sharedInformerFactory = new SharedInformerFactory(apiClient);
final GenericKubernetesApi<V1Service, V1ServiceList> servicesApi = new GenericKubernetesApi<>(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nothing changed here, just dropped final

/**
* Prefix of the properties.
*/
public static final String PREFIX = "spring.cloud.kubernetes.discovery";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prefix here so that it can be re-used

@wind57 wind57 marked this pull request as ready for review November 15, 2023 20:00
@wind57
Copy link
Contributor Author

wind57 commented Nov 15, 2023

@ryanjbaxter one more in the same direction... thank you.

@ryanjbaxter ryanjbaxter added this to the 3.0.6 milestone Nov 15, 2023
@ryanjbaxter ryanjbaxter merged commit 13787ee into spring-cloud:3.0.x Nov 15, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants