You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To discover services and endpoints only from specified namespaces you should set property `all-namespaces` to `false` and set the following property in `application.properties` (in this example namespaces are: `ns1` and `ns2`).
To discover service endpoint addresses that are not marked as "ready" by the kubernetes api server, you can set the following property in `application.properties` (default: false):
Copy file name to clipboardExpand all lines: spring-cloud-kubernetes-client-discovery/src/main/java/org/springframework/cloud/kubernetes/client/discovery/KubernetesInformerDiscoveryClient.java
Copy file name to clipboardExpand all lines: spring-cloud-kubernetes-client-discovery/src/test/java/org/springframework/cloud/kubernetes/client/discovery/KubernetesInformerDiscoveryClientTests.java
+37-13Lines changed: 37 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -65,6 +65,11 @@ public class KubernetesInformerDiscoveryClientTests {
Copy file name to clipboardExpand all lines: spring-cloud-kubernetes-client-discovery/src/test/java/org/springframework/cloud/kubernetes/client/discovery/reactive/KubernetesInformerReactiveDiscoveryClientTests.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -101,7 +101,7 @@ public void testDiscoveryGetInstanceAllNamespaceShouldWork() {
Copy file name to clipboardExpand all lines: spring-cloud-kubernetes-client-loadbalancer/src/test/java/org/springframework/cloud/kubernetes/client/loadbalancer/KubernetesClientServicesListSupplierTests.java
Copy file name to clipboardExpand all lines: spring-cloud-kubernetes-commons/src/main/java/org/springframework/cloud/kubernetes/commons/discovery/KubernetesDiscoveryProperties.java
+5-2Lines changed: 5 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,8 @@
27
27
/**
28
28
* @param enabled if kubernetes discovery is enabled
29
29
* @param allNamespaces if discover is enabled for all namespaces
30
+
* @param namespaces If set and allNamespaces is false, then only the services and
31
+
* endpoints matching these namespaces will be fetched from the Kubernetes API server.
30
32
* @param waitCacheReady wait for the discovery cache (service and endpoints) to be fully
31
33
* loaded, otherwise aborts the application on starting
32
34
* @param cacheLoadingTimeoutSeconds timeout for initializing discovery cache, will abort
Copy file name to clipboardExpand all lines: spring-cloud-kubernetes-commons/src/test/java/org/springframework/cloud/kubernetes/commons/discovery/KubernetesDiscoveryPropertiesTests.java
0 commit comments