-
Notifications
You must be signed in to change notification settings - Fork 484
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
feat: make expressions router default #939
Closed
Closed
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
10ec715
feat: make expressions router default in kong/ingress
czeslavo 1f0dc28
add validations
czeslavo 1ccbd6d
enable ExpressionRoutes in CI to pass tests with old KIC
czeslavo 830bccb
escape comma in --set
czeslavo d777988
change default in kong/kong, use file:// to refer to subchart in the …
czeslavo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -126,8 +126,8 @@ jobs: | |
strategy: | ||
matrix: | ||
kic-version: | ||
- "2.10" | ||
- "2.11" | ||
- "2.12" | ||
kong-version: | ||
- "3.3" | ||
- "3.2" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{{- /* Validate 'expressions' router flavor is not used with KIC < 2.10 as it's not supported */}} | ||
{{- if and .Values.controller.ingressController.enabled | ||
(eq .Values.gateway.env.router_flavor "expressions") | ||
(semverCompare "< 2.10" (include "kong.effectiveVersion" .Values.controller.ingressController.image)) | ||
-}} | ||
{{- fail (printf ` | ||
⚠️ Warning! | ||
|
||
"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. | ||
|
||
✅ 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 "gateway.env.router_flavor" to "traditional" to | ||
backoff to the previous router flavor in your values.yaml: | ||
|
||
gateway: | ||
env: | ||
router_flavor: "traditional"` .Values.controller.ingressController.image.tag ) -}} | ||
{{- end -}} | ||
|
||
{{- /* Validate that when 'expressions' router flavor is used with KIC < 3.0, feature flag must be set. */ -}} | ||
{{- if and (.Values.controller.ingressController.enabled) | ||
(eq .Values.gateway.env.router_flavor "expressions") | ||
(not (contains "ExpressionRoutes=true" (default "" .Values.controller.ingressController.env.feature_gates))) | ||
(semverCompare "< 3.0" (include "kong.effectiveVersion" .Values.controller.ingressController.image)) -}} | ||
{{- fail (printf ` | ||
⚠️ Warning! | ||
|
||
"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. | ||
|
||
✅ How to fix it (alternatives) | ||
|
||
1. Upgrade to Kong Ingress Controller 3.0 to use this feature. | ||
|
||
2. Set "controller.ingressController.env.feature_gates" to "ExpressionRoutes=true" to enable this feature in your values.yaml: | ||
|
||
controller: | ||
ingressController: | ||
env: | ||
feature_gates: "ExpressionRoutes=true" | ||
|
||
3. Set "gateway.env.router_flavor" to "traditional" to use the previous router flavor in your values.yaml: | ||
|
||
gateway: | ||
env: | ||
router_flavor: "traditional"` .Values.controller.ingressController.image.tag) -}} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,3 +44,4 @@ gateway: | |
env: | ||
role: traditional | ||
database: "off" | ||
router_flavor: "expressions" | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add a template to check image of KIC?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please elaborate on what you mean by this? There are two validation rules added in
validations.tpl
file: one for KIC < 2.10 and one for KIC < 3.0.