-
Notifications
You must be signed in to change notification settings - Fork 15
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: allow assigning KongPluginInstallation to GatewayConfiguration and DataPlane #476
Conversation
1c8f88f
to
6d1469a
Compare
f14564b
to
61f4b41
Compare
9e33515
to
b0b1da5
Compare
efb4710
to
e0b9544
Compare
f6b2a4c
to
bf5c1da
Compare
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.
Apart from Patryk's concern about the namespaced Plugin references in the DP CRD, it looks good to me now. 👍
9ff849a
to
2c374eb
Compare
a742111
to
d96aa1a
Compare
d96aa1a
to
1af158b
Compare
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.
I'm still going through this one but these are the minor nits I found so far.
1af158b
to
f514df8
Compare
28e257d
to
a1a74da
Compare
…and DataPlane Co-authored-by: Patryk Małek <patryk.malek@konghq.com> Co-authored-by: Grzegorz Burzyński <czeslavo@gmail.com>
a1a74da
to
3f14182
Compare
What this PR does / why we need it:
Kong custom plugin built from
Dockerfile
where
plugin
is a directory that containshandler.lua
andschema.lua
as described in the official docs.Image with the aforementioned Kong custom plugin is available publicly under
northamerica-northeast1-docker.pkg.dev/k8s-team-playground/plugin-example/myheader
-> adds headermyheader: roar
northamerica-northeast1-docker.pkg.dev/k8s-team-playground/plugin-example/myheader-2
(it's also mirrored inplugin-example-private
requires auth) -> adds headernewheader: amazing
Those are used in
config/samples/gateway-kongplugininstallation-httproute.yaml
and submitted as part of this PR and in the integration test.Functionality is implemented entirely. For each instance of Kong Gateway deployment, a dedicated
ConfigMap
with a custom plugin is created (based on sourceConfigMap
made as a result of the successful reconciliation ofKongPluginInstallation
) and its lifecycle is tied to Kong Gateway. Such an approach although a little bit wasteful, because there are many duplications ofConfigMap
s (but it's guaranteed that its size won't exceed 1MiB), greatly simplifies implementation. This is due to the limitation of Kubernetes - it's impossible to mount aConfigMap
from another namespace to aDeployment
. Furthermore, it reduces the blast radius of some mistakes, bugs, user actions, etc. to only one Dataplane - each one has its ownConfigMap
s and reconciles them on its own.Which issue this PR fixes
Closes #380
Special notes for your reviewer:
Those "magic" images used in tests and examples will be documented/reworked to make them easy to maintain in the separate issue #465
Maybe more testing would be useful, e.g. with the usage of newly created
envtests
or more integration ones, I'm open to suggestions that I'm going to address in a separate PR.PR Readiness Checklist:
Complete these before marking the PR as
ready to review
:CHANGELOG.md
release notes have been updated to reflect significant changes