Skip to content
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(plugins) allow cross-namespace KCP plugins #5913

Closed
wants to merge 1 commit into from

Conversation

rainest
Copy link
Contributor

@rainest rainest commented Apr 24, 2024

What this PR does / why we need it:

Removes the internal namespace tag when generating plugin configuration sets for KongClusterPlugins attached to multiple resources.

Previously, KongClusterPlugins attached to multiple resources of different types effectively behaved like one or more KongPlugins attached to each of those resources with respect to namespaces. A KongClusterPlugin attached to a Service and a KongConsumer in one namespace (A) and a KongConsumer in another (B) would result two plugin instances, one attached to a Kong service and consumer (namespace A) and one attached to a consumer only (namespace B).

After this change both plugins would be attached to a consumer and a service (the same service, but different consumers).

Which issue this PR fixes:

Fix #5355

Special notes for your reviewer:

This is possibly more of a breaking change than I initially thought.

The code to handle this is currently ugly as heck and duplicated. There's probably a cleaner way to refactor the larger plugin system.

This is manually tested to have the desired effect with plugin-demo.yaml.txt.

PR Readiness Checklist:

Complete these before marking the PR as ready to review:

  • the CHANGELOG.md release notes have been updated to reflect any significant (and particularly user-facing) changes introduced by this PR

@rainest
Copy link
Contributor Author

rainest commented May 22, 2024

Superseded by #5965

@rainest rainest closed this May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plugin attachment to a group of resources from different namespaces
1 participant