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):
188
198
189
199
====
@@ -223,7 +233,17 @@ this to work, you need to align the Kubernetes service name with the `spring.app
223
233
NOTE: `spring.application.name` has no effect as far as the name registered for the application within Kubernetes
224
234
225
235
Spring Cloud Kubernetes can also watch the Kubernetes service catalog for changes and update the
226
-
`DiscoveryClient` implementation accordingly. In order to enable this functionality you need to add
236
+
`DiscoveryClient` implementation accordingly. By "watch" we mean that we will publish a heartbeat event every `spring.cloud.kubernetes.discovery.catalog-services-watch-delay`
237
+
milliseconds (by default it is `30000`). The heartbeat event will contain the target references (and their namespaces of the addresses of all endpoints
238
+
(for the exact details of what will get returned you can take a look inside `KubernetesCatalogWatch`). This is an implementation detail, and listeners of the heartbeat event
239
+
should not rely on the details. Instead, they should see if there are differences between two subsequent heartbeats via `equals` method. We will take care to return a correct implementation that adheres to the equals contract.
240
+
The endpoints will be queried in either all namespaces (enabled via `spring.cloud.kubernetes.discovery.all-namespaces=true`), or
241
+
we will use: xref:property-source-config.adoc#namespace-resolution[Namespace Resolution].
242
+
243
+
244
+
245
+
246
+
In order to enable this functionality you need to add
227
247
`@EnableScheduling` on a configuration class in your application.
0 commit comments