Skip to content

Commit

Permalink
fix: kong proxy semver issue to use latest tag
Browse files Browse the repository at this point in the history
  • Loading branch information
gehlotanish committed Oct 10, 2024
1 parent df0de57 commit e585207
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/nethgate/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ maintainers:
name: nethgate
sources:
- https://github.com/Kong/charts/tree/main/charts/kong
version: 2.33.6
version: 2.33.7
appVersion: "3.5"
dependencies:
- name: postgresql
Expand Down
2 changes: 1 addition & 1 deletion charts/nethgate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ directory.
| Parameter | Description | Default |
| ---------------------------------- | ------------------------------------------------------------------------------------- | ------------------- |
| image.repository | Kong image | `kong` |
| image.tag | Kong image version | `3.5` |
| image.tag | Kong image version (proxy can use latest tag) | `3.5` |
| image.effectiveSemver | Semantic version to use for version-dependent features (if `tag` is not a semver) | |
| image.pullPolicy | Image pull policy | `IfNotPresent` |
| image.pullSecrets | Image pull secrets | `null` |
Expand Down
10 changes: 8 additions & 2 deletions charts/nethgate/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -1800,10 +1800,16 @@ extensions/v1beta1
{{- define "kong.proxy.compatibleReadiness" -}}
{{- $proxyReadiness := .Values.readinessProbe -}}
{{- if (or (semverCompare "< 3.3.0" (include "kong.effectiveVersion" .Values.image)) (and .Values.ingressController.enabled (semverCompare "< 2.11.0" (include "kong.effectiveVersion" .Values.ingressController.image)))) -}}
{{- $effectiveVersion := include "kong.effectiveVersion" .Values.image | default "0.0.0" -}}
{{- $ingressVersion := include "kong.effectiveVersion" .Values.ingressController.image | default "0.0.0" -}}
{{- if (or (and (not (eq .Values.image.tag "latest")) (semverCompare "< 3.3.0" $effectiveVersion))
(and .Values.ingressController.enabled (not (eq .Values.ingressController.image.tag "latest")) (semverCompare "< 2.11.0" $ingressVersion))
(eq .Values.image.tag "latest")) -}}
{{- if (eq $proxyReadiness.httpGet.path "/status/ready") -}}
{{- $_ := set $proxyReadiness.httpGet "path" "/status" -}}
{{- end -}}
{{- end -}}
{{- (toYaml $proxyReadiness) -}}
{{- (toYaml $proxyReadiness) | nindent 2 -}}
{{- end -}}

0 comments on commit e585207

Please sign in to comment.