Skip to content

Commit 428c8bd

Browse files
authored
Merge pull request #125 from jtherin/lbdefaultvalues
chore(lb): change default values
2 parents 334f760 + d558199 commit 428c8bd

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

docs/loadbalancer-annotations.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ NB: depending on the type, some other annotations are required, see below.
4949

5050
### `service.beta.kubernetes.io/scw-loadbalancer-health-check-delay`
5151
This is the annotation to set the time between two consecutive health checks.
52-
The default value is `10s`. The duration are go's time.Duration (ex: `1s`, `2m`, `4h`, ...).
52+
The default value is `5s`. The duration are go's time.Duration (ex: `1s`, `2m`, `4h`, ...).
5353

5454
### `service.beta.kubernetes.io/scw-loadbalancer-health-check-timeout`
5555
This is the annotaton to set the additional check timeout, after the connection has been already established.
56-
The default value is `10s`. The duration are go's time.Duration (ex: `1s`, `2m`, `4h`, ...).
56+
The default value is `5s`. The duration are go's time.Duration (ex: `1s`, `2m`, `4h`, ...).
5757

5858
### `service.beta.kubernetes.io/scw-loadbalancer-health-check-max-retries`
5959
This is the annotation to set the number of consecutive unsuccessful health checks, after wich the server will be considered dead.
60-
The default value is `10`.
60+
The default value is `5`.
6161

6262
### `service.beta.kubernetes.io/scw-loadbalancer-health-check-http-uri`
6363
This is the annotation to set the URI that is used by the `http` health check.
@@ -105,7 +105,7 @@ The default value is `10m`. The duration are go's time.Duration (ex: `1s`, `2m`,
105105

106106
### `service.beta.kubernetes.io/scw-loadbalancer-timeout-connect`
107107
This is the annotation to set the maximum initial server connection establishment time.
108-
The default value is `10m`. The duration are go's time.Duration (ex: `1s`, `2m`, `4h`, ...).
108+
The default value is `10s`. The duration are go's time.Duration (ex: `1s`, `2m`, `4h`, ...).
109109

110110
### `service.beta.kubernetes.io/scw-loadbalancer-timeout-tunnel`
111111
This is the annotation to set the maximum tunnel inactivity time.

scaleway/loadbalancers.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,15 @@ const (
5757
serviceAnnotationLoadBalancerHealthCheckType = "service.beta.kubernetes.io/scw-loadbalancer-health-check-type"
5858

5959
// serviceAnnotationLoadBalancerHealthCheckDelay is the time between two consecutive health checks
60-
// The default value is "10s". The duration are go's time.Duration (ex: "1s", "2m", "4h", ...)
60+
// The default value is "5s". The duration are go's time.Duration (ex: "1s", "2m", "4h", ...)
6161
serviceAnnotationLoadBalancerHealthCheckDelay = "service.beta.kubernetes.io/scw-loadbalancer-health-check-delay"
6262

6363
// serviceAnnotationLoadBalancerHealthCheckTimeout is the additional check timeout, after the connection has been already established
64-
// The default value is "10s". The duration are go's time.Duration (ex: "1s", "2m", "4h", ...)
64+
// The default value is "5s". The duration are go's time.Duration (ex: "1s", "2m", "4h", ...)
6565
serviceAnnotationLoadBalancerHealthCheckTimeout = "service.beta.kubernetes.io/scw-loadbalancer-health-check-timeout"
6666

6767
// serviceAnnotationLoadBalancerHealthCheckMaxRetries is the number of consecutive unsuccessful health checks, after wich the server will be considered dead
68-
// The default value is "10".
68+
// The default value is "5".
6969
serviceAnnotationLoadBalancerHealthCheckMaxRetries = "service.beta.kubernetes.io/scw-loadbalancer-health-check-max-retries"
7070

7171
// serviceAnnotationLoadBalancerHealthCheckHTTPURI is the URI that is used by the "http" health check
@@ -124,7 +124,7 @@ const (
124124
serviceAnnotationLoadBalancerTimeoutServer = "service.beta.kubernetes.io/scw-loadbalancer-timeout-server"
125125

126126
// serviceAnnotationLoadBalancerTimeoutConnect is the maximum initical server connection establishment time
127-
// The default value is "10m". The duration are go's time.Duration (ex: "1s", "2m", "4h", ...)
127+
// The default value is "10s". The duration are go's time.Duration (ex: "1s", "2m", "4h", ...)
128128
serviceAnnotationLoadBalancerTimeoutConnect = "service.beta.kubernetes.io/scw-loadbalancer-timeout-connect"
129129

130130
// serviceAnnotationLoadBalancerTimeoutTunnel is the maximum tunnel inactivity time
@@ -1408,7 +1408,7 @@ func getTimeoutClient(service *v1.Service) (time.Duration, error) {
14081408
func getTimeoutServer(service *v1.Service) (time.Duration, error) {
14091409
timeoutServer, ok := service.Annotations[serviceAnnotationLoadBalancerTimeoutServer]
14101410
if !ok {
1411-
return time.ParseDuration("10m")
1411+
return time.ParseDuration("10s")
14121412
}
14131413

14141414
timeoutServerDuration, err := time.ParseDuration(timeoutServer)
@@ -1469,7 +1469,7 @@ func getOnMarkedDownAction(service *v1.Service) (scwlb.OnMarkedDownAction, error
14691469
func getHealthCheckDelay(service *v1.Service) (time.Duration, error) {
14701470
healthCheckDelay, ok := service.Annotations[serviceAnnotationLoadBalancerHealthCheckDelay]
14711471
if !ok {
1472-
return time.ParseDuration("10s")
1472+
return time.ParseDuration("5s")
14731473
}
14741474

14751475
healthCheckDelayDuration, err := time.ParseDuration(healthCheckDelay)
@@ -1484,7 +1484,7 @@ func getHealthCheckDelay(service *v1.Service) (time.Duration, error) {
14841484
func getHealthCheckTimeout(service *v1.Service) (time.Duration, error) {
14851485
healthCheckTimeout, ok := service.Annotations[serviceAnnotationLoadBalancerHealthCheckTimeout]
14861486
if !ok {
1487-
return time.ParseDuration("10s")
1487+
return time.ParseDuration("5s")
14881488
}
14891489

14901490
healthCheckTimeoutDuration, err := time.ParseDuration(healthCheckTimeout)
@@ -1499,7 +1499,7 @@ func getHealthCheckTimeout(service *v1.Service) (time.Duration, error) {
14991499
func getHealthCheckMaxRetries(service *v1.Service) (int32, error) {
15001500
healthCheckMaxRetries, ok := service.Annotations[serviceAnnotationLoadBalancerHealthCheckMaxRetries]
15011501
if !ok {
1502-
return 10, nil
1502+
return 5, nil
15031503
}
15041504

15051505
healthCheckMaxRetriesInt, err := strconv.Atoi(healthCheckMaxRetries)

0 commit comments

Comments
 (0)