Skip to content

Commit 79ced28

Browse files
author
Ryan Baxter
committed
Adding documentation about exposing restart actuator endpoint. Fixes spring-cloud#540
1 parent 8be8297 commit 79ced28

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

docs/src/main/asciidoc/property-source-config.adoc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,9 +473,26 @@ The reload feature of Spring Cloud Kubernetes is able to trigger an application
473473
By default, this feature is disabled. You can enable it by using the `spring.cloud.kubernetes.reload.enabled=true` configuration property (for example, in the `application.properties` file).
474474

475475
The following levels of reload are supported (by setting the `spring.cloud.kubernetes.reload.strategy` property):
476+
476477
* `refresh` (default): Only configuration beans annotated with `@ConfigurationProperties` or `@RefreshScope` are reloaded.
477478
This reload level leverages the refresh feature of Spring Cloud Context.
479+
478480
* `restart_context`: the whole Spring `ApplicationContext` is gracefully restarted. Beans are recreated with the new configuration.
481+
In order for the restart context functionality to work properly you must enable and expose the restart actuator endpoint
482+
[source,yaml]
483+
====
484+
----
485+
management:
486+
endpoint:
487+
restart:
488+
enabled: true
489+
endpoints:
490+
web:
491+
exposure:
492+
include: restart
493+
----
494+
====
495+
479496
* `shutdown`: the Spring `ApplicationContext` is shut down to activate a restart of the container.
480497
When you use this level, make sure that the lifecycle of all non-daemon threads is bound to the `ApplicationContext`
481498
and that a replication controller or replica set is configured to restart the pod.

0 commit comments

Comments
 (0)