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

Using plugins needing config with Kong 2.0.0 is broken #521

Closed
jfrancisco0 opened this issue Jan 29, 2020 · 0 comments · Fixed by #522
Closed

Using plugins needing config with Kong 2.0.0 is broken #521

jfrancisco0 opened this issue Jan 29, 2020 · 0 comments · Fixed by #522

Comments

@jfrancisco0
Copy link

jfrancisco0 commented Jan 29, 2020

NOTE: GitHub issues are reserved for bug reports only.
For anything else, please join the conversation
in Kong Nation https://discuss.konghq.com/c/kubernetes.


Summary

Updating from Kong 1.5.0 to 2.0.0 causes many error messages relating to plugin configuration, resulting in a non-functional Kong.

Kong Ingress controller version
0.7.0

Kong or Kong Enterprise version
Kong 2.0.0

Kubernetes version

Client Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.2", GitCommit:"59603c6e503c87169aea6106f57b9f242f64df89", GitTreeState:"clean", BuildDate:"2020-01-23T14:21:54Z", GoVersion:"go1.13.6", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"14+", GitVersion:"v1.14.9-eks-c0eccc", GitCommit:"c0eccca51d7500bb03b2f163dd8d534ffeb2f7a2", GitTreeState:"clean", BuildDate:"2019-12-22T23:14:11Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"}

Environment

  • Cloud provider or hardware configuration:
    Amazon EKS

What happened

Using Kong 2.0.0 with plugins needing configuration (KongPlugin with config: field), we get the following errors:

controller.go:119] unexpected failure updating Kong configuration:
posting new config to /config: 400 Bad Request {"fields":{"plugins":[{"run_on":"unknown field"}]},"name":"invalid declarative configuration","code":14,"message":"declarative config is invalid: {plugins={{run_on=\"unknown field\"}}}"}
W0129 17:25:24.899531       1 queue.go:112] requeuing kube-system/prometheus-operator-kubelet, err posting new config to /config: 400 Bad Request {"fields":{"plugins":[{"run_on":"unknown field"}]},"name":"invalid declarative configuration","code":14,"message":"declarative config is invalid: {plugins={{run_on=\"unknown field\"}}}"}

Expected behavior

Plugin (and Kong) should operate normally

Steps To Reproduce

  1. Set up Kong 1.5.0 with ingress controller 0.7.0
  2. Configure a Kong plugin that needs configuration (e.g. request-transformer)
  3. Update Kong to 2.0.0
hbagdi added a commit that referenced this issue Jan 31, 2020
Kong 2.0.0 removed the `run_on` property on the `plugins` entity.
Controller's code always injects it avoid false positives during diffs.

The change nils the property for Kong 2.0 and above only to avoid any
effect on Kong Enterprise, which follows a different versioning scheme.

From #522
Fix #521
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant