diff --git a/README.adoc b/README.adoc index 5cc3ff0c..132c003f 100644 --- a/README.adoc +++ b/README.adoc @@ -643,9 +643,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. diff --git a/docs/src/main/asciidoc/_configprops.adoc b/docs/src/main/asciidoc/_configprops.adoc index 5ed06703..f743abbb 100644 --- a/docs/src/main/asciidoc/_configprops.adoc +++ b/docs/src/main/asciidoc/_configprops.adoc @@ -71,6 +71,9 @@ |spring.cloud.kubernetes.reload.monitoring-secrets | false | Enables monitoring on secrets to detect changes. |spring.cloud.kubernetes.reload.period | 15000ms | Sets the polling period to use when the detection mode is POLLING. |spring.cloud.kubernetes.reload.strategy | | Sets the reload strategy for Kubernetes configuration reload on change. +|spring.cloud.kubernetes.ribbon.cluster-domain | cluster.local | cluster domain. +|spring.cloud.kubernetes.ribbon.enabled | true | Ribbon enabled,default true. +|spring.cloud.kubernetes.ribbon.mode | | {@link KubernetesRibbonMode} setting ribbon server list with ip of pod or service name. default value is POD. |spring.cloud.kubernetes.secrets.enable-api | false | |spring.cloud.kubernetes.secrets.enabled | true | Enable the Secrets property source locator. |spring.cloud.kubernetes.secrets.labels | |