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

add alignWithControllerVersion to allow auto-adjustment of GW settings #936

Closed
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
8 changes: 4 additions & 4 deletions charts/ingress/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
dependencies:
- name: kong
repository: https://charts.konghq.com
repository: file://../kong/
version: 2.31.0
- name: kong
repository: https://charts.konghq.com
repository: file://../kong/
version: 2.31.0
digest: sha256:2897c91fb6e37c04f99a413dac85f991fed223591b8de327a04795e27b90a617
generated: "2023-11-06T14:36:11.845865+01:00"
digest: sha256:43b29b6944b4f933dac8cea47c076a151e793df14464d52b4029c9d5689c5c6d
generated: "2023-11-09T13:56:18.166194+01:00"
4 changes: 2 additions & 2 deletions charts/ingress/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ appVersion: "3.4"
dependencies:
- name: kong
version: ">=2.31.0"
repository: https://charts.konghq.com
repository: file://../kong/
alias: controller
condition: controller.enabled
- name: kong
version: ">=2.31.0"
repository: https://charts.konghq.com
repository: file://../kong/
alias: gateway
condition: gateway.enabled
9 changes: 7 additions & 2 deletions charts/kong/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -1714,12 +1714,17 @@ extensions/v1beta1

{{- define "kong.router_flavor" -}}
{{- if .Values.env.router_flavor -}}
{{- /* If explicitly specified in envs, it always wins. */ -}}
.Values.env.router_flavor
{{- else -}}
{{- if (and .Values.ingressController.enabled (semverCompare ">= 3.0.0" (include "kong.effectiveVersion" .Values.ingressController.image))) -}}
{{- /* If not set explicitly in envs, try using the most modern router based on Ingress Controller version. */ -}}
{{- if or (and .Values.ingressController.enabled (semverCompare ">= 3.0.0" (include "kong.effectiveVersion" .Values.ingressController.image)))
(and .Values.deployment.kong.alignWithControllerVersion (semverCompare ">= 3.0.0" .Values.deployment.kong.alignWithControllerVersion))
-}}
expressions
{{- /* If no Ingress Controller version is set, use a default router flavor. */ -}}
{{- else -}}
traditional_compatible
traditional
{{- end -}}
{{- end -}}
{{- end -}}
6 changes: 6 additions & 0 deletions charts/kong/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ deployment:
# Setting this to false with ingressController.enabled=true will create a
# controller-only release.
enabled: true

# Make Gateway deployment settings to be aligned with a given Ingress Controller version capabilities
# (e.g. use a most-modern router flavor supported by a given Ingress Controller version).
# If left empty, safe defaults will be used (if not specified explicitly in this chart).
alignWithControllerVersion: ""

## Minimum number of seconds for which a newly created pod should be ready without any of its container crashing,
## for it to be considered available.
# minReadySeconds: 60
Expand Down