-
Notifications
You must be signed in to change notification settings - Fork 590
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 missing Service/Route annotations #3121
Merged
Merged
Conversation
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
Add annotations for connect, write, and read timeouts to Services.
rainest
force-pushed
the
feat/timeout-anns
branch
from
November 1, 2022 23:19
b5cc516
to
29aa2fb
Compare
6 tasks
Add annotation support for headers. The annotation is in the form "konghq.com/headers/example: value1,value2", where the portion of the annoation name after "konghq.com/headers" ("example") is the header name and the value is a CSV of header values.
rainest
force-pushed
the
feat/timeout-anns
branch
from
November 2, 2022 00:19
e4d6c22
to
ea8e901
Compare
rainest
force-pushed
the
feat/timeout-anns
branch
from
November 2, 2022 00:29
ea8e901
to
9ab6cff
Compare
randmonkey
reviewed
Nov 2, 2022
pmalek
reviewed
Nov 2, 2022
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.
Mostly nits, overall 👍
Co-authored-by: Patryk Małek <patryk.malek@konghq.com>
rainest
changed the title
Add missing Service annotations
Add missing Service/Route annotations
Nov 2, 2022
pmalek
approved these changes
Nov 3, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What this PR does / why we need it:
Adds annotations for connect/write/read timeouts and retries to Services. These were available in KongIngress but not via annotations.
Adds annotations for headers and path handling to Routes. Ditto KongIngress/annotation split.
Which issue this PR fixes:
Fix #3017
Special notes
headers
is more complicated than most fields. It is a string->string array map and cannot really be handled by a single key/value pair without compromises.The design presented here, where part of the value we give to Kong is embedded in the annotation name, seems reasonable to me, but it is novel, so I'm calling it out. It's also handled a bit differently in the code. The annotations package functions usually return the value with minimal parsing, if any, and the kongstate functions are responsible for most complex logic. This doesn't work with the name-embedded value, so the headers function does a lot more work in the annotations function.
PR Readiness Checklist:
Complete these before marking the PR as
ready to review
:CHANGELOG.md
release notes have been updated to reflect any significant (and particularly user-facing) changes introduced by this PR