opened
jfrancisco0
username_0
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.

---

<!--
If this is a BUG REPORT, please:
  - Fill in as much of the template below as you can.  If you leave out
    information, we can't help you as well.

Be ready for followup questions, and please respond in a timely
manner.  If we can't reproduce a bug, we
might close your issue.  If we're wrong, PLEASE feel free to reopen it and
explain why.
-->

### 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
Using plugins needing config with Kong 2.0.0 is broken
issue
closed
hbagdi
username_1
issue