Skip to content

Commit d3b644c

Browse files
titpetricolamilekan000
authored andcommitted
rebase and resolve conflict
1 parent 9b376e5 commit d3b644c

File tree

8 files changed

+935
-2
lines changed

8 files changed

+935
-2
lines changed

components/tyk-gateway/templates/_helpers.tpl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,15 @@ Create chart name and version as used by the chart label.
5252
{{- printf "%s" .Values.gateway.image.tag | replace "v" "" -}}
5353
{{- end -}}
5454

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+
5564
{{- define "tyk-gateway.redis_url" -}}
5665
{{- if .Values.global.redis.addrs -}}
5766
{{ join "," .Values.global.redis.addrs }}

components/tyk-gateway/templates/deployment-gw-repset.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ spec:
117117
value: "{{ .Values.global.oasValidateExamples }}"
118118
- name: TYK_GW_OAS_VALIDATE_SCHEMA_DEFAULTS
119119
value: "{{ .Values.global.oasValidateSchemaDefaults }}"
120+
- name: TYK_GW_ENABLEFIXEDWINDOWRATELIMITER
121+
value: "{{ .Values.gateway.enableFixedWindowRateLimiter }}"
120122

121123
{{- if .Values.global.redis.sslInsecureSkipVerify }}
122124
- name: TYK_GW_STORAGE_SSLINSECURESKIPVERIFY
@@ -412,7 +414,7 @@ spec:
412414
httpGet:
413415
scheme: "HTTP{{ if .Values.global.tls.gateway }}S{{ end }}"
414416
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" .) }}
416418
port: {{ .Values.gateway.control.containerPort }}
417419
{{- else }}
418420
port: {{ .Values.gateway.containerPort }}
@@ -425,7 +427,7 @@ spec:
425427
httpGet:
426428
scheme: "HTTP{{ if .Values.global.tls.gateway }}S{{ end }}"
427429
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" .) }}
429431
port: {{ .Values.gateway.control.containerPort }}
430432
{{- else }}
431433
port: {{ .Values.gateway.containerPort }}

components/tyk-gateway/values.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,13 @@ gateway:
161161
# The hostname to bind the Gateway to.
162162
hostName: tyk-gw.local
163163

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+
164171
# If this option is set to true, it will enable polling the Tyk Dashboard service for API definitions
165172
useDashboardAppConfig:
166173
enabled: false
@@ -321,6 +328,11 @@ gateway:
321328
# - chart-example-different-domain-possible.local
322329
tls: []
323330

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+
324336
# Creates an ingress object in k8s. Will require an ingress-controller and
325337
# annotation to that ingress controller.
326338
ingress:

tyk-control-plane/values.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,13 @@ tyk-gateway:
257257
# The hostname to bind the Gateway to.
258258
hostName: &gwHostName tyk-gw.local
259259

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+
260267
# If this option is set to true, it will enable polling the Dashboard service for API definitions
261268
useDashboardAppConfig:
262269
enabled: true

tyk-data-plane/values.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,13 @@ tyk-gateway:
184184
# The hostname to bind the Gateway to.
185185
hostName: tyk-gw.local
186186

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+
187194
tls:
188195
# The name of the secret which should contain the TLS certificate you want to use with the gateway deployment
189196
secretName: tyk-default-tls-secret
@@ -315,6 +322,11 @@ tyk-gateway:
315322
# - chart-example-different-domain-possible.local
316323
tls: []
317324

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+
318330
# Creates an ingress object in k8s. Will require an ingress-controller and
319331
# annotation to that ingress controller.
320332
ingress:

tyk-oss/values.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,13 @@ tyk-gateway:
158158
# The hostname to bind the Gateway to.
159159
hostName: tyk-gw.local
160160

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+
161168
tls:
162169
# The name of the secret which should contain the TLS certificate you want to use with the gateway deployment
163170
secretName: tyk-default-tls-secret
@@ -298,6 +305,11 @@ tyk-gateway:
298305
# - chart-example-different-domain-possible.local
299306
tls: []
300307

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+
301313
# Creates an ingress object in k8s. Will require an ingress-controller and
302314
# annotation to that ingress controller.
303315
ingress:

0 commit comments

Comments
 (0)