-
Notifications
You must be signed in to change notification settings - Fork 483
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: set default router flavor to expressions if KIC >=3.0 and traditional_compatible otherwide #935
base: main
Are you sure you want to change the base?
Conversation
…tional_compatible otherwise
{{- if (and .Values.ingressController.enabled (semverCompare ">= 3.0.0" (include "kong.effectiveVersion" .Values.ingressController.image))) -}} | ||
expressions | ||
{{- else -}} | ||
traditional_compatible |
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.
As I understand this also changes the default when KIC is < 3.0.0 from traditional
to traditional_compatible
, is this intended?
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.
👍 on keeping whatever was the default - traditional
for KIC <3.0.
On one hand setting this in chart makes this predictable for us. Regardless of Kong Gateway version we use as default, we'll always get the expected behavior. On the other hand though, users might be expecting the Gateway defaults to translate into corresponding chart settings. We've had a long history of setting the router flavor so I'd say we retain this and keep setting it in the chart. If there'a debate we'd like to have on this I suggest we consider pros and cons of that in a separate issue. |
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.
As mentioned on the team sync, we have to keep in mind this won't work as expected with kong/ingress
chart. gateway
part of the release doesn't know about the controller
's ingressController.image
. The condition will be executed based on the gateway
's ingressController.image
(which will be the default from values.yaml
- so we accidentally get KIC 3.0 there always if a user for some weird reason didn't change gateway.ingressController.image
to something else).
As an example, this change will break Konnect values.yaml
where we still want to keep using traditional_compatible
router with KIC 2.11/2.12:
controller:
ingressController:
image:
tag: "2.11"
...
gateway:
image:
repository: kong/kong-gateway
tag: "3.4"
...
As this will pick expressions
based on the default value of gateway.ingressController.image
which is 3.0 now.
EDIT after checking actual results: As in the template there's .Values.ingressController.enabled
condition required to set router flavor to expressions
, for kong/ingress
chart this will always default to traditional_compatible
. The problem persists though because the router flavor is not changed based on the KIC version as intended. So, if we set controller.ingressController.image.tag
to 3.0
to start using KIC 3.0 in kong/ingress
, Gateway's router flavor will still default to traditional_compatible
.
I think we have to either:
- Wait for @rainest's Split the Deployment #923
- Add some templating to
kong/ingress
that will somehow overridegateway.ingressController.image
to what is set incontroller.ingressController.image
.
I was trying to come up with some workaround that would make this work with I was trying to use The only more-or-less reasonable way I came up with was adding a new variable in I think I just assured myself that #923 is the only way we can make it work as we expected. |
I couldn't find the helm doc page on this but #937 shows how it could be used to enforce the router flavor in |
As I understand that would prevent using anything else but Sidenote: If I'm not mistaken, |
Hmm, yes. We'd like to set this for the user as in perform the defaulting in template code rather than limit the possibilities as #937 is trying to do. In this case I'm not sure this is possible this way (or at least without massive rewrite of
|
@pmalek I came up with another alternative: #939. It sets the router flavor to expressions in
|
What this PR does / why we need it:
Add
kong.router_flavor
to set router flavor to:values.env.router_flavor
if specifiedexpressions
if KIC is enabled and image version >= 3.0.0traditional_compatible
otherwise (REVIEW: is it better to leave it empty to let Kong gateway to use the default value)?Which issue this PR fixes
(optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged)Special notes for your reviewer:
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]
main
branch.