From 3ba438177742e1d200c5866fcf911f6b4b4cc7a0 Mon Sep 17 00:00:00 2001 From: Ryan Baxter Date: Tue, 23 Jun 2020 16:49:06 -0400 Subject: [PATCH] Updating README --- README.adoc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.adoc b/README.adoc index b0b30893..0c5184f5 100644 --- a/README.adoc +++ b/README.adoc @@ -632,9 +632,26 @@ The reload feature of Spring Cloud Kubernetes is able to trigger an application 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). The following levels of reload are supported (by setting the `spring.cloud.kubernetes.reload.strategy` property): + * `refresh` (default): Only configuration beans annotated with `@ConfigurationProperties` or `@RefreshScope` are reloaded. This reload level leverages the refresh feature of Spring Cloud Context. + * `restart_context`: the whole Spring `ApplicationContext` is gracefully restarted. Beans are recreated with the new configuration. +In order for the restart context functionality to work properly you must enable and expose the restart actuator endpoint +[source,yaml] +==== +---- +management: + endpoint: + restart: + enabled: true + endpoints: + web: + exposure: + include: restart +---- +==== + * `shutdown`: the Spring `ApplicationContext` is shut down to activate a restart of the container. When you use this level, make sure that the lifecycle of all non-daemon threads is bound to the `ApplicationContext` and that a replication controller or replica set is configured to restart the pod.