Skip to content

Commit 3953864

Browse files
committed
Add missing LB properties to additiona-spring-configuration-metadata and configprops. Fix typo. Fixes gh-1086.
1 parent 294badc commit 3953864

File tree

3 files changed

+125
-1
lines changed

3 files changed

+125
-1
lines changed

docs/src/main/asciidoc/_configprops.adoc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,32 @@
3333
|spring.cloud.loadbalancer.configurations | `default` | Enables a predefined LoadBalancer configuration.
3434
|spring.cloud.loadbalancer.enabled | `true` | Enables Spring Cloud LoadBalancer.
3535
|spring.cloud.loadbalancer.health-check | | Properties for <code>HealthCheckServiceInstanceListSupplier</code>.
36+
|spring.cloud.loadbalancer.health-check.initial-delay | `0` | Initial delay value for the HealthCheck scheduler.
37+
|spring.cloud.loadbalancer.health-check.interval | `25s` | Interval for rerunning the HealthCheck scheduler.
38+
|spring.cloud.loadbalancer.health-check.path | | Path at which the health-check request should be made. Can be set up per `serviceId`. A `default` value can be set up as well. If none is set up, `/actuator/health` will be used.
39+
|spring.cloud.loadbalancer.health-check.port | | Path at which the health-check request should be made. If none is set, the port under which the requested service is available at the service instance.
40+
|spring.cloud.loadbalancer.health-check.refetch-instances | `false` | Indicates whether the instances should be refetched by the `HealthCheckServiceInstanceListSupplier`. This can be used if the instances can be updated and the underlying delegate does not provide an ongoing flux.
41+
|spring.cloud.loadbalancer.health-check.refetch-instances-interval | `25s` | Interval for refetching available service instances.
42+
|spring.cloud.loadbalancer.health-check.repeat-health-check | `true` | Indicates whether health checks should keep repeating. It might be useful to set it to `false` if periodically refetching the instances, as every refetch will also trigger a healthcheck.
3643
|spring.cloud.loadbalancer.hint | | Allows setting the value of <code>hint</code> that is passed on to the LoadBalancer request and can subsequently be used in {@link ReactiveLoadBalancer} implementations.
3744
|spring.cloud.loadbalancer.hint-header-name | `X-SC-LB-Hint` | Allows setting the name of the header used for passing the hint for hint-based service instance filtering.
3845
|spring.cloud.loadbalancer.retry | | Properties for Spring-Retry and Reactor Retry support in Spring Cloud LoadBalancer.
3946
|spring.cloud.loadbalancer.retry.avoid-previous-instance | `true` | Enables wrapping ServiceInstanceListSupplier beans with `RetryAwareServiceInstanceListSupplier` if Spring-Retry is in the classpath.
47+
|spring.cloud.loadbalancer.retry.backoff.enabled | `false` | Indicates whether Reactor Retry backoffs should be applied.
48+
|spring.cloud.loadbalancer.retry.backoff.jitter | `0.5` | Used to set `RetryBackoffSpec.jitter`.
49+
|spring.cloud.loadbalancer.retry.backoff.max-backoff | `Long.MAX ms` | Used to set `RetryBackoffSpec.maxBackoff`.
50+
|spring.cloud.loadbalancer.retry.backoff.min-backoff | `5 ms` | Used to set `RetryBackoffSpec#minBackoff`.
4051
|spring.cloud.loadbalancer.retry.enabled | | Enables LoadBalancer retries.
52+
|spring.cloud.loadbalancer.retry.max-retries-on-next-service-instance | `1` | Number of retries to be executed on the next `ServiceInstance`. A `ServiceInstance` is chosen before each retry call.
53+
|spring.cloud.loadbalancer.retry.max-retries-on-same-service-instance | `0` | umber of retries to be executed on the same `ServiceInstance`.
54+
|spring.cloud.loadbalancer.retry.retry-on-all-operations | `false` | Indicates retries should be attempted on operations other than `HttpMethod.GET`}.
55+
|spring.cloud.loadbalancer.retry.retryable-status-codes | `{}` | A `Set` of status codes that should trigger a retry.
4156
|spring.cloud.loadbalancer.service-discovery.timeout | | String representation of Duration of the timeout for calls to service discovery.
4257
|spring.cloud.loadbalancer.sticky-session | | Properties for LoadBalancer sticky-session.
58+
|spring.cloud.loadbalancer.sticky-session.add-service-instance-cookie | `false` | Indicates whether a cookie with the newly selected instance should be added by LoadBalancer.
59+
|spring.cloud.loadbalancer.sticky-session.instance-id-cookie-name | `sc-lb-instance-id` | The name of the cookie holding the preferred instance id.
4360
|spring.cloud.loadbalancer.x-forwarded | | Enabling X-Forwarded Host and Proto Headers.
61+
|spring.cloud.loadbalancer.x-forwarded.enabled | `false` | To Enable X-Forwarded Headers.
4462
|spring.cloud.loadbalancer.zone | | Spring Cloud LoadBalancer zone.
4563
|spring.cloud.refresh.additional-property-sources-to-retain | | Additional property sources to retain during a refresh. Typically only system property sources are retained. This property allows property sources, such as property sources created by EnvironmentPostProcessors to be retained as well.
4664
|spring.cloud.refresh.enabled | `true` | Enables autoconfiguration for the refresh scope and associated features.

spring-cloud-commons/src/main/java/org/springframework/cloud/client/loadbalancer/LoadBalancerProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ public static class HealthCheck {
194194
private Map<String, String> path = new LinkedCaseInsensitiveMap<>();
195195

196196
/**
197-
* Path at which the health-check request should be made. If none is set, the port
197+
* Port at which the health-check request should be made. If none is set, the port
198198
* under which the requested service is available at the service instance.
199199
*/
200200
private Integer port;

spring-cloud-commons/src/main/resources/META-INF/additional-spring-configuration-metadata.json

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,112 @@
5252
"name": "spring.cloud.loadbalancer.retry.enabled",
5353
"description": "Enables LoadBalancer retries.",
5454
"type": "java.lang.Boolean"
55+
},
56+
{
57+
"name": "spring.cloud.loadbalancer.health-check.initial-delay",
58+
"defaultValue": 0,
59+
"description": "Initial delay value for the HealthCheck scheduler.",
60+
"type": "java.time.Duration"
61+
},
62+
{
63+
"name": "spring.cloud.loadbalancer.health-check.interval ",
64+
"defaultValue": "25s",
65+
"description": "Interval for rerunning the HealthCheck scheduler.",
66+
"type": "java.time.Duration"
67+
},
68+
{
69+
"name": "spring.cloud.loadbalancer.health-check.path",
70+
"description": "Path at which the health-check request should be made. Can be set up per `serviceId`. A `default` value can be set up as well. If none is set up, `/actuator/health` will be used.",
71+
"type": "java.util.Map"
72+
},
73+
{
74+
"name": "spring.cloud.loadbalancer.health-check.port",
75+
"description": "Path at which the health-check request should be made. If none is set, the port under which the requested service is available at the service instance.",
76+
"type": "java.lang.Integer"
77+
},
78+
{
79+
"name": "spring.cloud.loadbalancer.health-check.refetch-instances",
80+
"defaultValue": false,
81+
"description": "Indicates whether the instances should be refetched by the `HealthCheckServiceInstanceListSupplier`. This can be used if the instances can be updated and the underlying delegate does not provide an ongoing flux.",
82+
"type": "java.lang.Boolean"
83+
},
84+
{
85+
"name": "spring.cloud.loadbalancer.health-check.refetch-instances-interval",
86+
"defaultValue": "25s",
87+
"description": "Interval for refetching available service instances.",
88+
"type": "java.time.Duration"
89+
},
90+
{
91+
"name": "spring.cloud.loadbalancer.health-check.repeat-health-check",
92+
"defaultValue": true,
93+
"description": "Indicates whether health checks should keep repeating. It might be useful to set it to `false` if periodically refetching the instances, as every refetch will also trigger a healthcheck.",
94+
"type": "java.lang.Boolean"
95+
},
96+
{
97+
"name": "spring.cloud.loadbalancer.retry.backoff.enabled",
98+
"defaultValue": false,
99+
"description": "Indicates whether Reactor Retry backoffs should be applied.",
100+
"type": "java.lang.Boolean"
101+
},
102+
{
103+
"name": "spring.cloud.loadbalancer.retry.backoff.jitter",
104+
"defaultValue": 0.5,
105+
"description": "Used to set `RetryBackoffSpec.jitter`.",
106+
"type": "java.lang.Double"
107+
},
108+
{
109+
"name": "spring.cloud.loadbalancer.retry.backoff.max-backoff",
110+
"defaultValue": "Long.MAX ms",
111+
"description": "Used to set `RetryBackoffSpec.maxBackoff`.",
112+
"type": "java.time.Duration"
113+
},
114+
{
115+
"name": "spring.cloud.loadbalancer.retry.backoff.min-backoff",
116+
"defaultValue": "5 ms",
117+
"description": "Used to set `RetryBackoffSpec#minBackoff`.",
118+
"type": "java.time.Duration"
119+
},
120+
{
121+
"name": "spring.cloud.loadbalancer.retry.max-retries-on-next-service-instance",
122+
"defaultValue": 1,
123+
"description": "Number of retries to be executed on the next `ServiceInstance`. A `ServiceInstance` is chosen before each retry call.",
124+
"type": "java.lang.Integer"
125+
},
126+
{
127+
"name": "spring.cloud.loadbalancer.retry.max-retries-on-same-service-instance",
128+
"defaultValue": 0,
129+
"description": "umber of retries to be executed on the same `ServiceInstance`.",
130+
"type": "java.lang.Integer"
131+
},
132+
{
133+
"name": "spring.cloud.loadbalancer.retry.retry-on-all-operations",
134+
"defaultValue": false,
135+
"description": "Indicates retries should be attempted on operations other than `HttpMethod.GET`}.",
136+
"type": "java.lang.Boolean"
137+
},
138+
{
139+
"name": "spring.cloud.loadbalancer.retry.retryable-status-codes",
140+
"defaultValue": "{}",
141+
"description": "A `Set` of status codes that should trigger a retry.",
142+
"type": "java.util.Set"
143+
},
144+
{
145+
"name": "spring.cloud.loadbalancer.sticky-session.add-service-instance-cookie",
146+
"defaultValue": false,
147+
"description": "Indicates whether a cookie with the newly selected instance should be added by LoadBalancer.",
148+
"type": "java.lang.Boolean"
149+
},
150+
{
151+
"name": "spring.cloud.loadbalancer.sticky-session.instance-id-cookie-name",
152+
"defaultValue": "sc-lb-instance-id",
153+
"description": "The name of the cookie holding the preferred instance id.",
154+
"type": "java.lang.String"
155+
},
156+
{
157+
"name": "spring.cloud.loadbalancer.x-forwarded.enabled",
158+
"defaultValue": false,
159+
"description": "To Enable X-Forwarded Headers.",
160+
"type": "java.lang.Boolean"
55161
}
56162
]
57163
}

0 commit comments

Comments
 (0)