Skip to content

Commit

Permalink
change default in kong/kong, use file:// to refer to subchart in the …
Browse files Browse the repository at this point in the history
…same repo
  • Loading branch information
czeslavo committed Nov 13, 2023
1 parent 830bccb commit d777988
Show file tree
Hide file tree
Showing 12 changed files with 84 additions and 27 deletions.
4 changes: 2 additions & 2 deletions charts/ingress/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
- < `2.10.0`:
1. Bump the controller version to >= `3.0.0`.
1. Set `gateway.env.router_flavor` to `traditional` to keep using the old router flavor.
- \>= `2.10.0` and < `3.0.0`:
- < `3.0.0`:
1. Bump the controller version to >= `3.0.0`.
1. Set `gateway.env.router_flavor` to `traditional` to keep using the old router flavor.
1. Set `controller.env.feature_gates=ExpressionRoutes=true` to use the new router flavor.
1. Set `controller.ingressController.env.feature_gates=ExpressionRoutes=true` to use the new router flavor.
[#939](https://github.com/Kong/charts/pull/939)

## 0.9.0
Expand Down
12 changes: 6 additions & 6 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
version: 2.31.0
repository: file://../kong/
version: 2.32.0
- name: kong
repository: https://charts.konghq.com
version: 2.31.0
digest: sha256:2897c91fb6e37c04f99a413dac85f991fed223591b8de327a04795e27b90a617
generated: "2023-11-06T14:36:11.845865+01:00"
repository: file://../kong/
version: 2.32.0
digest: sha256:237d8d361b79638a5e0730a476383ff38e0dc0e89d8bf16a68d4ae59b7066464
generated: "2023-11-13T10:56:42.680929+01:00"
8 changes: 4 additions & 4 deletions charts/ingress/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ version: 0.10.0
appVersion: "3.4"
dependencies:
- name: kong
version: ">=2.31.0"
repository: https://charts.konghq.com
version: ">=2.32.0"
repository: file://../kong/
alias: controller
condition: controller.enabled
- name: kong
version: ">=2.31.0"
repository: https://charts.konghq.com
version: ">=2.32.0"
repository: file://../kong/
alias: gateway
condition: gateway.enabled
4 changes: 2 additions & 2 deletions charts/ingress/templates/validation.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
(semverCompare "< 2.10" (include "kong.effectiveVersion" .Values.controller.ingressController.image))
-}}
{{- fail (printf `
⚠️ Warning!
❌ Error!
"kong/ingress" chart in version 0.10.0 has introduced "gateway.env.router_flavor" value defaulting to "expressions".
"expressions" router flavor is not supported with Kong Ingress Controller %q that you're using.
Expand All @@ -27,7 +27,7 @@ gateway:
(not (contains "ExpressionRoutes=true" (default "" .Values.controller.ingressController.env.feature_gates)))
(semverCompare "< 3.0" (include "kong.effectiveVersion" .Values.controller.ingressController.image)) -}}
{{- fail (printf `
⚠️ Warning!
❌ Error!
"kong/ingress" chart in version 0.10.0 has introduced "gateway.env.router_flavor" value defaulting to "expressions".
You're using Kong Ingress Controller version %q which supports this feature only when feature flag "ExpressionRoutes=true" is set.
Expand Down
1 change: 0 additions & 1 deletion charts/ingress/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,3 @@ gateway:
env:
role: traditional
database: "off"
router_flavor: "expressions"
17 changes: 17 additions & 0 deletions charts/kong/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Changelog

## 2.32.0

### Improvements

- Changed the default router flavor (`env.router_flavor` value) to performance-boosting `expressions`.
It can make `helm install` fail if you're using this chart with Kong Ingress Controller pinned to a version
older than `3.0.0`.
To fix it, you have the following options for given controller versions:
- < `2.10.0`:
1. Bump the controller version to >= `3.0.0`.
1. Set `env.router_flavor` to `traditional` to keep using the old router flavor.
- < `3.0.0`:
1. Bump the controller version to >= `3.0.0`.
1. Set `env.router_flavor` to `traditional` to keep using the old router flavor.
1. Set `ingressController.env.feature_gates=ExpressionRoutes=true` to use the new router flavor.
[#939](https://github.com/Kong/charts/pull/939)

## 2.31.0

### Improvements
Expand Down
2 changes: 1 addition & 1 deletion charts/kong/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ maintainers:
name: kong
sources:
- https://github.com/Kong/charts/tree/main/charts/kong
version: 2.31.0
version: 2.32.0
appVersion: "3.4"
dependencies:
- name: postgresql
Expand Down
3 changes: 1 addition & 2 deletions charts/kong/ci/admin-api-service-clusterip-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ dblessConfig:
url: http://example.com
routes:
- name: example
paths:
- "/example"
expression: http.path ^= "/example"
ingressController:
enabled: false
3 changes: 1 addition & 2 deletions charts/kong/ci/test3-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,4 @@ dblessConfig:
url: http://example.com
routes:
- name: example
paths:
- "/example"
expression: http.path ^= "/example"
3 changes: 1 addition & 2 deletions charts/kong/ci/test4-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,4 @@ dblessConfig:
url: http://example.com
routes:
- name: example
paths:
- "/example"
expression: http.path ^= "/example"
48 changes: 48 additions & 0 deletions charts/kong/templates/validation.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{{- /* Validate 'expressions' router flavor is not used with KIC < 2.10 as it's not supported */}}
{{- if and .Values.ingressController.enabled
(eq .Values.env.router_flavor "expressions")
(semverCompare "< 2.10" (include "kong.effectiveVersion" .Values.ingressController.image))
-}}
{{- fail (printf `
❌ Error!
"kong/kong" chart in version 2.32.0 has introduced "env.router_flavor" value defaulting to "expressions".
"expressions" router flavor is not supported with Kong Ingress Controller %q that you're using.
✅ How to fix it (alternatives)
1. Upgrade to Kong Ingress Controller 3.0 to use this feature.
2. If you want to keep using your Kong Ingress Controller version, set "env.router_flavor" to "traditional" to
backoff to the previous router flavor in your values.yaml:
env:
router_flavor: "traditional"` .Values.ingressController.image.tag ) -}}
{{- end -}}

{{- /* Validate that when 'expressions' router flavor is used with KIC < 3.0, feature flag must be set. */ -}}
{{- if and (.Values.ingressController.enabled)
(eq .Values.env.router_flavor "expressions")
(not (contains "ExpressionRoutes=true" (default "" .Values.ingressController.env.feature_gates)))
(semverCompare "< 3.0" (include "kong.effectiveVersion" .Values.ingressController.image)) -}}
{{- fail (printf `
❌ Error!
"kong/kong" chart in version 2.32.0 has introduced "env.router_flavor" value defaulting to "expressions".
"expressions" router flavor is not supported with Kong Ingress Controller %q that you're using.
✅ How to fix it (alternatives)
1. Upgrade to Kong Ingress Controller 3.0 to use this feature.
2. Set "ingressController.env.feature_gates" to "ExpressionRoutes=true" to enable this feature in your values.yaml:
ingressController:
env:
feature_gates: "ExpressionRoutes=true"
3. Set "env.router_flavor" to "traditional" to use the previous router flavor in your values.yaml:
env:
router_flavor: "traditional"` .Values.ingressController.image.tag) -}}
{{- end -}}
6 changes: 1 addition & 5 deletions charts/kong/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,7 @@ deployment:
# is set below. In general, you should not set values here if they are set elsewhere.
env:
database: "off"
# the chart uses the traditional router (for Kong 3.x+) because the ingress
# controller generates traditional routes. if you do not use the controller,
# you may set this to "traditional_compatible" or "expressions" to use the new
# DSL-based router
router_flavor: "traditional"
router_flavor: "expressions"
nginx_worker_processes: "2"
proxy_access_log: /dev/stdout
admin_access_log: /dev/stdout
Expand Down

0 comments on commit d777988

Please sign in to comment.