Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TT-10310 fix: Support latest image tag #137

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions components/tyk-gateway/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
4 changes: 2 additions & 2 deletions components/tyk-gateway/templates/deployment-gw-repset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand Down
5 changes: 5 additions & 0 deletions components/tyk-gateway/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 5 additions & 0 deletions tyk-control-plane/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,11 @@
# annotations for control port service
annotations: {}

# 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

Check failure on line 385 in tyk-control-plane/values.yaml

View workflow job for this annotation

GitHub Actions / lint-test

[trailing-spaces] trailing spaces

# Creates an ingress object in k8s. Will require an ingress-controller and
# annotation to that ingress controller.
ingress:
Expand Down
5 changes: 5 additions & 0 deletions tyk-data-plane/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 5 additions & 0 deletions tyk-oss/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 5 additions & 0 deletions tyk-stack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,11 @@
# annotations for control port service
annotations: {}

# 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

Check failure on line 394 in tyk-stack/values.yaml

View workflow job for this annotation

GitHub Actions / lint-test

[trailing-spaces] trailing spaces

# Creates an ingress object in k8s. Will require an ingress-controller and
# annotation to that ingress controller.
ingress:
Expand Down
Loading