File tree Expand file tree Collapse file tree 8 files changed +935
-2
lines changed Expand file tree Collapse file tree 8 files changed +935
-2
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,15 @@ Create chart name and version as used by the chart label.
52
52
{ {- printf " %s" .Values.gateway.image.tag | replace " v" " " -} }
53
53
{ {- end -} }
54
54
55
+
56
+ { {- define " tyk-gateway.probe-on-control-port" -} }
57
+ { {- if or .Values.gateway.control.useForProbes (eq .Values.gateway.image.tag " latest" ) -} }
58
+ true
59
+ { {- else -} }
60
+ { {- or (semverCompare " >= 3.2.0" (include " tyk-gateway.gateway-version" . )) (semverCompare " >=3.0.4 < 3.1.0" (include " tyk-gateway.gateway-version" .)) -} }
61
+ { {- end -} }
62
+ { {- end -} }
63
+
55
64
{ {- define " tyk-gateway.redis_url" -} }
56
65
{ {- if .Values.global.redis.addrs -} }
57
66
{ { join " ," .Values.global.redis.addrs } }
Original file line number Diff line number Diff line change @@ -117,6 +117,8 @@ spec:
117
117
value : " {{ .Values.global.oasValidateExamples }}"
118
118
- name : TYK_GW_OAS_VALIDATE_SCHEMA_DEFAULTS
119
119
value : " {{ .Values.global.oasValidateSchemaDefaults }}"
120
+ - name : TYK_GW_ENABLEFIXEDWINDOWRATELIMITER
121
+ value : " {{ .Values.gateway.enableFixedWindowRateLimiter }}"
120
122
121
123
{{- if .Values.global.redis.sslInsecureSkipVerify }}
122
124
- name : TYK_GW_STORAGE_SSLINSECURESKIPVERIFY
@@ -412,7 +414,7 @@ spec:
412
414
httpGet :
413
415
scheme : " HTTP{{ if .Values.global.tls.gateway }}S{{ end }}"
414
416
path : /hello
415
- {{- if and .Values.gateway.control.enabled (or (semverCompare ">= 3.2.0" ( include "tyk-gateway.gateway-version" . )) (semverCompare ">=3.0.4 < 3.1.0" (include "tyk-gateway.gateway-version " .)) ) }}
417
+ {{- if and .Values.gateway.control.enabled (include "tyk-gateway.probe-on-control-port " .) }}
416
418
port : {{ .Values.gateway.control.containerPort }}
417
419
{{- else }}
418
420
port : {{ .Values.gateway.containerPort }}
@@ -425,7 +427,7 @@ spec:
425
427
httpGet :
426
428
scheme : " HTTP{{ if .Values.global.tls.gateway }}S{{ end }}"
427
429
path : /hello
428
- {{- if and .Values.gateway.control.enabled (or (semverCompare ">= 3.2.0" ( include "tyk-gateway.gateway-version" . )) (semverCompare ">=3.0.4 < 3.1.0" (include "tyk-gateway.gateway-version " .)) ) }}
430
+ {{- if and .Values.gateway.control.enabled (include "tyk-gateway.probe-on-control-port " .) }}
429
431
port : {{ .Values.gateway.control.containerPort }}
430
432
{{- else }}
431
433
port : {{ .Values.gateway.containerPort }}
Original file line number Diff line number Diff line change @@ -161,6 +161,13 @@ gateway:
161
161
# The hostname to bind the Gateway to.
162
162
hostName : tyk-gw.local
163
163
164
+ # EnableFixedWindowRateLimiter enables fixed window rate limiting.
165
+ # FixedWindow will allow requests up to the configured rate limit,
166
+ # and then block traffic for the remainder of the window duration.
167
+ # It has minimal impact on redis, however it will not protect against
168
+ # traffic spikes, it does not have spike arrest behaviour.
169
+ enableFixedWindowRateLimiter : false
170
+
164
171
# If this option is set to true, it will enable polling the Tyk Dashboard service for API definitions
165
172
useDashboardAppConfig :
166
173
enabled : false
@@ -321,6 +328,11 @@ gateway:
321
328
# - chart-example-different-domain-possible.local
322
329
tls : []
323
330
331
+ # The health endpoint is exposed on the control port or the service port, depending on image tag.
332
+ # Set to true to override to having the health endpoint on the control port.
333
+ # Useful if the tag is not semVer compatible.
334
+ useForProbes : false
335
+
324
336
# Creates an ingress object in k8s. Will require an ingress-controller and
325
337
# annotation to that ingress controller.
326
338
ingress :
Original file line number Diff line number Diff line change @@ -257,6 +257,13 @@ tyk-gateway:
257
257
# The hostname to bind the Gateway to.
258
258
hostName : &gwHostName tyk-gw.local
259
259
260
+ # EnableFixedWindowRateLimiter enables fixed window rate limiting.
261
+ # FixedWindow will allow requests up to the configured rate limit,
262
+ # and then block traffic for the remainder of the window duration.
263
+ # It has minimal impact on redis, however it will not protect against
264
+ # traffic spikes, it does not have spike arrest behaviour.
265
+ enableFixedWindowRateLimiter : false
266
+
260
267
# If this option is set to true, it will enable polling the Dashboard service for API definitions
261
268
useDashboardAppConfig :
262
269
enabled : true
Original file line number Diff line number Diff line change @@ -184,6 +184,13 @@ tyk-gateway:
184
184
# The hostname to bind the Gateway to.
185
185
hostName : tyk-gw.local
186
186
187
+ # EnableFixedWindowRateLimiter enables fixed window rate limiting.
188
+ # FixedWindow will allow requests up to the configured rate limit,
189
+ # and then block traffic for the remainder of the window duration.
190
+ # It has minimal impact on redis, however it will not protect against
191
+ # traffic spikes, it does not have spike arrest behaviour.
192
+ enableFixedWindowRateLimiter : false
193
+
187
194
tls :
188
195
# The name of the secret which should contain the TLS certificate you want to use with the gateway deployment
189
196
secretName : tyk-default-tls-secret
@@ -315,6 +322,11 @@ tyk-gateway:
315
322
# - chart-example-different-domain-possible.local
316
323
tls : []
317
324
325
+ # The health endpoint is exposed on the control port or the service port, depending on image tag.
326
+ # Set to true to override to having the health endpoint on the control port.
327
+ # Useful if the tag is not semVer compatible.
328
+ useForProbes : false
329
+
318
330
# Creates an ingress object in k8s. Will require an ingress-controller and
319
331
# annotation to that ingress controller.
320
332
ingress :
Original file line number Diff line number Diff line change @@ -158,6 +158,13 @@ tyk-gateway:
158
158
# The hostname to bind the Gateway to.
159
159
hostName : tyk-gw.local
160
160
161
+ # EnableFixedWindowRateLimiter enables fixed window rate limiting.
162
+ # FixedWindow will allow requests up to the configured rate limit,
163
+ # and then block traffic for the remainder of the window duration.
164
+ # It has minimal impact on redis, however it will not protect against
165
+ # traffic spikes, it does not have spike arrest behaviour.
166
+ enableFixedWindowRateLimiter : false
167
+
161
168
tls :
162
169
# The name of the secret which should contain the TLS certificate you want to use with the gateway deployment
163
170
secretName : tyk-default-tls-secret
@@ -298,6 +305,11 @@ tyk-gateway:
298
305
# - chart-example-different-domain-possible.local
299
306
tls : []
300
307
308
+ # The health endpoint is exposed on the control port or the service port, depending on image tag.
309
+ # Set to true to override to having the health endpoint on the control port.
310
+ # Useful if the tag is not semVer compatible.
311
+ useForProbes : false
312
+
301
313
# Creates an ingress object in k8s. Will require an ingress-controller and
302
314
# annotation to that ingress controller.
303
315
ingress :
You can’t perform that action at this time.
0 commit comments