Bumping versions

This commit is contained in:
buildmaster
2023-03-09 04:04:04 +00:00
parent 8438ff60da
commit 9cb8b2bd39
4 changed files with 10 additions and 3 deletions

View File

@@ -112,6 +112,8 @@ This client lets you query Kubernetes endpoints (see https://kubernetes.io/docs/
A service is typically exposed by the Kubernetes API server as a collection of endpoints that represent `http` and `https` addresses and that a client can
access from a Spring Boot application running as a pod.
DiscoveryClient can also find services of type `ExternalName` (see https://kubernetes.io/docs/concepts/services-networking/service/#externalname[ExternalName services]). At the moment, external name support type of services is only available if the following property `spring.cloud.kubernetes.discovery.include-external-name-services` is set to `true` and only in the `fabric8` implementation. In a later release, support will be added for the kubernetes native client also.
This is something that you get for free by adding the following dependency inside your project:
====
@@ -218,6 +220,8 @@ Please make sure to configure your service and/or application accordingly.
By default all of the ports and their names will be added to the metadata of the `ServiceInstance`.
As said before, if you want to get the list of `ServiceInstance` to also include the `ExternalName` type services, you need to enable that support via: `spring.cloud.kubernetes.discovery.include-external-name-services=true`. As such, when calling `DiscoveryClient::getInstances` those will be returned also. You can distinguish between `ExternalName` and any other types by inspecting `ServiceInstance::getMetadata` and lookup for a field called `type`. This will be the type of the service returned : `ExternalName`/`ClusterIP`, etc.
If, for any reason, you need to disable the `DiscoveryClient`, you can set the following property in `application.properties`:
====

View File

@@ -62,6 +62,7 @@
|spring.cloud.kubernetes.discovery.cache-loading-timeout-seconds | `+++60+++` |
|spring.cloud.kubernetes.discovery.enabled | `+++true+++` |
|spring.cloud.kubernetes.discovery.filter | |
|spring.cloud.kubernetes.discovery.include-external-name-services | `+++false+++` |
|spring.cloud.kubernetes.discovery.include-not-ready-addresses | `+++false+++` |
|spring.cloud.kubernetes.discovery.known-secure-ports | `+++[443, 8443]+++` |
|spring.cloud.kubernetes.discovery.metadata.add-annotations | `+++true+++` |

View File

@@ -36,8 +36,8 @@ public class KubernetesClientLoadBalancerClientConfiguration {
ServiceInstanceListSupplier kubernetesServicesListSupplier(Environment environment, CoreV1Api coreV1Api,
KubernetesClientServiceInstanceMapper mapper, KubernetesDiscoveryProperties discoveryProperties,
KubernetesNamespaceProvider kubernetesNamespaceProvider, ConfigurableApplicationContext context) {
return ServiceInstanceListSupplier.builder().withBase(new KubernetesClientServicesListSupplier(environment, mapper, discoveryProperties, coreV1Api,
kubernetesNamespaceProvider)).withCaching().build(context);
return ServiceInstanceListSupplier.builder().withBase(new KubernetesClientServicesListSupplier(environment,
mapper, discoveryProperties, coreV1Api, kubernetesNamespaceProvider)).withCaching().build(context);
}
}

View File

@@ -37,7 +37,9 @@ public class Fabric8LoadBalancerClientConfiguration {
ServiceInstanceListSupplier kubernetesServicesListSupplier(Environment environment,
KubernetesClient kubernetesClient, Fabric8ServiceInstanceMapper mapper,
KubernetesDiscoveryProperties discoveryProperties, ConfigurableApplicationContext context) {
return ServiceInstanceListSupplier.builder().withBase(new Fabric8ServicesListSupplier(environment, kubernetesClient, mapper, discoveryProperties)).withCaching().build(context);
return ServiceInstanceListSupplier.builder()
.withBase(new Fabric8ServicesListSupplier(environment, kubernetesClient, mapper, discoveryProperties))
.withCaching().build(context);
}
}