Skip to content

Commit cab85c7

Browse files
authored
disable conn-throttle by default (#189)
* disable conn-throttle by default * set to 0 only if nothing is specified: * update readmne
1 parent acb82b8 commit cab85c7

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Each *Service* annotation **MUST** be prefixed with:<br />
4141

4242
Annotation (Suffix) | Values | Default | Description
4343
---|---|---|---
44-
`throttle` | `0`-`20` (`0` to disable) | `20` | Client Connection Throttle, which limits the number of subsequent new connections per second from the same client IP
44+
`throttle` | `0`-`20` (`0` to disable) | `0` | Client Connection Throttle, which limits the number of subsequent new connections per second from the same client IP
4545
`default-protocol` | `tcp`, `http`, `https` | `tcp` | This annotation is used to specify the default protocol for Linode NodeBalancer.
4646
`default-proxy-protocol` | `none`, `v1`, `v2` | `none` | Specifies whether to use a version of Proxy Protocol on the underlying NodeBalancer.
4747
`port-*` | json (e.g. `{ "tls-secret-name": "prod-app-tls", "protocol": "https", "proxy-protocol": "v2"}`) | | Specifies port specific NodeBalancer configuration. See [Port Specific Configuration](#port-specific-configuration). `*` is the port being configured, e.g. `linode-loadbalancer-port-443`

cloud/linode/loadbalancers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,7 @@ func getTLSCertInfo(ctx context.Context, kubeClient kubernetes.Interface, namesp
825825
}
826826

827827
func getConnectionThrottle(service *v1.Service) int {
828-
connThrottle := 20
828+
connThrottle := 0 // disable throttle if nothing is specified
829829

830830
if connThrottleString := service.GetAnnotations()[annotations.AnnLinodeThrottle]; connThrottleString != "" {
831831
parsed, err := strconv.Atoi(connThrottleString)

cloud/linode/loadbalancers_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1818,7 +1818,7 @@ func Test_getConnectionThrottle(t *testing.T) {
18181818
Annotations: map[string]string{},
18191819
},
18201820
},
1821-
20,
1821+
0,
18221822
},
18231823
{
18241824
"throttle value is a string",
@@ -1831,7 +1831,7 @@ func Test_getConnectionThrottle(t *testing.T) {
18311831
},
18321832
},
18331833
},
1834-
20,
1834+
0,
18351835
},
18361836
{
18371837
"throttle value is less than 0",

0 commit comments

Comments
 (0)