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
If the application is using a non-default actuator path and/or using a different port for the management endpoints, the Kubernetes service for the application
@@ -224,7 +227,13 @@ Another way you can choose to configure the actuator path and/or management port
224
227
## Messaging Implementation
225
228
226
229
The messaging implementation can be enabled by setting profile to either `bus-amqp` (RabbitMQ) or `bus-kafka` (Kafka) when the Spring Cloud Kubernetes Configuration Watcher
227
-
application is deployed to Kubernetes.
230
+
application is deployed to Kubernetes. By default, when using the messaging implementation the configuration watcher will send a `RefreshRemoteApplicationEvent` using
231
+
Spring Cloud Bus to all application instances. This will cause the application instances to refresh the application's configuration properties without
232
+
restarting the instance.
233
+
234
+
You can also configure the configuration to shut down the application instances in order to refresh the application's configuration properties.
235
+
When the application shuts down, Kubernetes will restart the application instance and the new configuration properties will be loaded. To use
236
+
this strategy set `spring.cloud.kubernetes.configuration.watcher.refresh-strategy=shutdown`.
Copy file name to clipboardExpand all lines: spring-cloud-kubernetes-commons/src/main/java/org/springframework/cloud/kubernetes/commons/discovery/KubernetesDiscoveryProperties.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@
27
27
28
28
/**
29
29
* @param enabled if kubernetes discovery is enabled
30
-
* @param allNamespaces if discover is enabled for all namespaces
30
+
* @param allNamespaces if discovery is enabled for all namespaces
31
31
* @param namespaces If set and allNamespaces is false, then only the services and
32
32
* endpoints matching these namespaces will be fetched from the Kubernetes API server.
33
33
* @param waitCacheReady wait for the discovery cache (service and endpoints) to be fully
Copy file name to clipboardExpand all lines: spring-cloud-kubernetes-controllers/spring-cloud-kubernetes-configuration-watcher/src/main/java/org/springframework/cloud/kubernetes/configuration/watcher/BusRefreshTrigger.java
Copy file name to clipboardExpand all lines: spring-cloud-kubernetes-controllers/spring-cloud-kubernetes-configuration-watcher/src/main/java/org/springframework/cloud/kubernetes/configuration/watcher/ConfigurationWatcherConfigurationProperties.java
+26Lines changed: 26 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -70,6 +70,8 @@ public class ConfigurationWatcherConfigurationProperties {
Copy file name to clipboardExpand all lines: spring-cloud-kubernetes-controllers/spring-cloud-kubernetes-configuration-watcher/src/main/java/org/springframework/cloud/kubernetes/configuration/watcher/HttpRefreshTrigger.java
Copy file name to clipboardExpand all lines: spring-cloud-kubernetes-controllers/spring-cloud-kubernetes-configuration-watcher/src/main/java/org/springframework/cloud/kubernetes/configuration/watcher/RefreshTriggerAutoConfiguration.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -41,8 +41,8 @@ class RefreshTriggerAutoConfiguration {
Copy file name to clipboardExpand all lines: spring-cloud-kubernetes-controllers/spring-cloud-kubernetes-configuration-watcher/src/test/java/org/springframework/cloud/kubernetes/configuration/watcher/BusEventBasedConfigMapWatcherChangeDetectorTests.java
Copy file name to clipboardExpand all lines: spring-cloud-kubernetes-controllers/spring-cloud-kubernetes-configuration-watcher/src/test/java/org/springframework/cloud/kubernetes/configuration/watcher/BusEventBasedSecretsWatcherChangeDetectorTests.java
0 commit comments