-
Notifications
You must be signed in to change notification settings - Fork 593
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
Support Kong 2.2 request/response route buffering #924
Comments
Kong 2.2 does not introduce any breaking change here - these options make it possible to tell Kong to flush the buffers immediately so that Kong does not introduce latency. |
Discussion to be had as to whether we want to implement this both as an annotation and in the KongIngress resource, or only in one of those places. |
More detailed knowledge share on what this will look like in practice. These are both boolean flags, so the code for them will be similar to the boolean annotation/override on strip-path: https://docs.konghq.com/kubernetes-ingress-controller/1.1.x/references/annotations/#konghqcomstrip-path Annotations and KongIngress resources provide two means to set Kong settings that don't fit well into the standard K8S resources. We originally had KongIngress only, but found that having to maintain a separate resource that could apply to Ingresses and Services both with links that were sometimes automatic (based on KongIngress and the other resource having the same name) and sometimes manual (via an annotation) wasn't great UX, and started moving as many settings as possible into annotations. IMO the annotation code is cleaner and the overall UX is better, so if we could move to creating those only, I'm all for it. However, I'd asked @hbagdi if deprecating KongIngress entirely was an option previously and was told it wasn't, so while I think that's something we should consider revisiting, for now I still add both methods of setting these features when adding a new one. In the implementation, this happens via an override system in the parser. IIRC these are the parts needed to add a new override:
I've used strip_path here as it's a boolean, as are these new parameters. #863 is a more recent PR that shows another example override addition, but it's a bit more complex, as it also has validation and sanitization, similar to the methods annotation. The above steps also don't go over the Go-based tests; please see the SNI and methods PRs for examples of those. At a high level, our unit tests
We're not perfectly consistent with those, and they have changed a bit due to the recent parser restructuring. Although the SNI PR is still in progress, it uses the modern code, whereas the methods PR predates the parser restructure. |
Does the If it helps I could take a stab at implementing this, let me know :-) |
The onboarding label has a similar meaning to good first issue in that it's a good learning item to get more familiar with the codebase :). It has nothing to do with release planning. But, coincidentally, this issue is work in progress by us already and is likely to be included in the next minor release.
Like I said above, this is already being worked on. We'd very happily welcome your contributions on other items in our issue tracker. 🙂 |
thanks for the awesome writeup @rainest 😃 |
Kong 2.2 introduces new boolean route configuration options,
request_buffering
andresponse_buffering
. Both default totrue
.KIC will need to support these via new annotations and KongIngress route configuration options.
The text was updated successfully, but these errors were encountered: