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

InstanceName of plugins produces unknown field error in Kong 2.8.x #5241

Closed
1 task done
randmonkey opened this issue Nov 28, 2023 · 2 comments
Closed
1 task done

InstanceName of plugins produces unknown field error in Kong 2.8.x #5241

randmonkey opened this issue Nov 28, 2023 · 2 comments
Labels
bug Something isn't working < v3.0.0
Milestone

Comments

@randmonkey
Copy link
Contributor

randmonkey commented Nov 28, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When InstanceName is specified in KongPlugin or KongClusterPlugin, the error happens when sending configuration to Kong 2.8.x

 {"name":"invalid declarative configuration","fields":{"plugins":[{"instance_name":"unknown field"}]},"code":14,"message":"declarative config is invalid: {plugins={{instance_name=\"unknown field\"}}}"}

This makes Kong gateway stuck on updating configuration.

Expected Behavior

Valid configuration of plugins (without instance_name field) sent to Kong when Kong version is below 3.2.0.
Ref:
https://docs.konghq.com/gateway/2.8.x/admin-api/#plugin-object
https://docs.konghq.com/gateway/3.1.x/admin-api/#plugin-object
https://docs.konghq.com/gateway/3.2.x/admin-api/#plugin-object
The instance_name field is first added in Kong 3.2.x.

Steps To Reproduce

1. Create a KongPlugin foo with field InstanceName
2. Create an Ingress referencing this plugin by adding annotation konghq.com/plugins: "foo"

Kong Ingress Controller version

2.12.2

Kubernetes version

1.28.0 kind cluster

Anything else?

This does not affect KIC 3.0.x because KIC 3.x only support Kong 3.4.1 and above.

@randmonkey
Copy link
Contributor Author

Fixed in #5250. TODO: add CHANGELOG.

@pmalek
Copy link
Member

pmalek commented Dec 5, 2023

Would it be possible to conditionally add instance name for Kong Gateway versions older than 3.2? Would it increase the complexity in a way that it would significantly increase the maintenance costs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working < v3.0.0
Projects
None yet
Development

No branches or pull requests

2 participants