diff --git a/components/tyk-gateway/templates/_helpers.tpl b/components/tyk-gateway/templates/_helpers.tpl index 17491770..76174e2a 100644 --- a/components/tyk-gateway/templates/_helpers.tpl +++ b/components/tyk-gateway/templates/_helpers.tpl @@ -52,6 +52,15 @@ Create chart name and version as used by the chart label. {{- printf "%s" .Values.gateway.image.tag | replace "v" "" -}} {{- end -}} + +{{- define "tyk-gateway.probe-on-control-port" -}} +{{- if or .Values.gateway.control.useForProbes (eq .Values.gateway.image.tag "latest") -}} +true +{{- else -}} +{{- or (semverCompare ">= 3.2.0" (include "tyk-gateway.gateway-version" . )) (semverCompare ">=3.0.4 < 3.1.0" (include "tyk-gateway.gateway-version" .)) -}} +{{- end -}} +{{- end -}} + {{- define "tyk-gateway.redis_url" -}} {{- if .Values.global.redis.addrs -}} {{ join "," .Values.global.redis.addrs }} diff --git a/components/tyk-gateway/templates/deployment-gw-repset.yaml b/components/tyk-gateway/templates/deployment-gw-repset.yaml index 4cc9a3d1..22dc788c 100644 --- a/components/tyk-gateway/templates/deployment-gw-repset.yaml +++ b/components/tyk-gateway/templates/deployment-gw-repset.yaml @@ -414,7 +414,7 @@ spec: httpGet: scheme: "HTTP{{ if .Values.global.tls.gateway }}S{{ end }}" path: /hello - {{- 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" .))) }} + {{- if and .Values.gateway.control.enabled (include "tyk-gateway.probe-on-control-port" .) }} port: {{ .Values.gateway.control.containerPort }} {{- else }} port: {{ .Values.gateway.containerPort }} @@ -427,7 +427,7 @@ spec: httpGet: scheme: "HTTP{{ if .Values.global.tls.gateway }}S{{ end }}" path: /hello - {{- 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" .))) }} + {{- if and .Values.gateway.control.enabled (include "tyk-gateway.probe-on-control-port" .) }} port: {{ .Values.gateway.control.containerPort }} {{- else }} port: {{ .Values.gateway.containerPort }} diff --git a/components/tyk-gateway/values.yaml b/components/tyk-gateway/values.yaml index 27938fe3..3cd6727e 100644 --- a/components/tyk-gateway/values.yaml +++ b/components/tyk-gateway/values.yaml @@ -328,6 +328,11 @@ gateway: # - chart-example-different-domain-possible.local tls: [] + # The health endpoint is exposed on the control port or the service port, depending on image tag. + # Set to true to override to having the health endpoint on the control port. + # Useful if the tag is not semVer compatible. + useForProbes: false + # Creates an ingress object in k8s. Will require an ingress-controller and # annotation to that ingress controller. ingress: diff --git a/tyk-data-plane/values.yaml b/tyk-data-plane/values.yaml index f33edc53..da68430e 100644 --- a/tyk-data-plane/values.yaml +++ b/tyk-data-plane/values.yaml @@ -322,6 +322,11 @@ tyk-gateway: # - chart-example-different-domain-possible.local tls: [] + # The health endpoint is exposed on the control port or the service port, depending on image tag. + # Set to true to override to having the health endpoint on the control port. + # Useful if the tag is not semVer compatible. + useForProbes: false + # Creates an ingress object in k8s. Will require an ingress-controller and # annotation to that ingress controller. ingress: diff --git a/tyk-oss/values.yaml b/tyk-oss/values.yaml index 7af889d2..1b2303a0 100644 --- a/tyk-oss/values.yaml +++ b/tyk-oss/values.yaml @@ -305,6 +305,11 @@ tyk-gateway: # - chart-example-different-domain-possible.local tls: [] + # The health endpoint is exposed on the control port or the service port, depending on image tag. + # Set to true to override to having the health endpoint on the control port. + # Useful if the tag is not semVer compatible. + useForProbes: false + # Creates an ingress object in k8s. Will require an ingress-controller and # annotation to that ingress controller. ingress: