-
Notifications
You must be signed in to change notification settings - Fork 25
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: kong plugin #1073
feat: kong plugin #1073
Conversation
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.
Very cool! The one unchecked cache is my only useful comment.
I built the dockerfile, but didn't test further than that
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.
just some documentation nits.
can you also add something to .github/MAINTAINERS.md
on how we'll end up deploying this? if that's sensitive info then it can go somewhere in our handbook. would just like to have some docs somewhere on how this gets from this repo to customers.
mind also giving this a PR title? 🥺 |
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.
Nice work, that was quick! Left a few comments as tidy up, but it's super close.
|
||
In the future: | ||
|
||
- We will build a Docker image for the plugin and release it to the Kong Community plugins site. |
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.
@anandkumarpatel do you have any tickets in place for these tasks? If not, can we start tracking them?
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.
not yet! where should I add these tickets to? (note, this is just for hackathon, so we wont work on the tickets unless there is traction so not sure if its worth adding them?)
@@ -0,0 +1,98 @@ | |||
-- Helper functions provided by Kong Gateway, see https://github.com/Kong/kong/blob/master/spec/helpers.lua | |||
local helpers = require "spec.helpers" |
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.
While I'm not sure how reasonable it is in this chunk of work, it would be nice to support integration tests for this (and Cloudflare) in our main integration test suite. I think that might require some mocking similar to how Wrangler does it.
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.
whats our integration test environment like? if it can run docker then we should be able to create some! otherwise we won't really be able to run a kong instance.
# Run kong with the plugin | ||
curl -Ls https://get.konghq.com/quickstart | bash -s -- -r "" -i kong-readme-plugin -t v1 | ||
# Enable the plugin | ||
curl -isX POST http://localhost:8001/plugins -d name=readme-plugin -d 'config.api_key=<Your API Key>' |
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.
Why port 8001
? What if this is exposed on another port?
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.
if they ran the above script, its 8001. I am assuming if they don't follow the script they would know what they are doing.
development = false, | ||
error = nil, | ||
group = group, | ||
_id = entry.request.id, |
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.
This is typically a UUID that we create in the client. I'm not seeing that done here, am I missing something?
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.
kong creates unique id, thats where this id
is coming from
@erunion Thanks for the review, I fixed your issues. let me know if there is something else you want to see! |
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.
nice work
Co-authored-by: Jon Ursenbach <[email protected]>
Co-authored-by: Jon Ursenbach <[email protected]>
🧰 Changes
Add kong plugin
🧬 QA & Testing
Follow the "Deploying locally" instructions in the PR