Setup of cors plugin fails in K8s

Hi,
I am trying to activate cors plugin in my K8s cluster, unfortunately a face a trouble not really clear to me.
I have installed Kong as follows:

helm3 repo add kong https://charts.konghq.com
helm3 repo update
helm3 install -f values.yaml --skip-crds kong kong/kong

with this values.yaml:

image:
  tag: 2.0.1-alpine
ingressController:
  enabled: true

then I apply following KongPlugin configuration via ‘kubectl apply -f …’

apiVersion: configuration.konghq.com/v1
kind: KongPlugin
plugin: cors
enabled: true
run_on: first
metadata:
  name: cors-ingress
  namespace: default
  labels:
    global: "true"
config:
  origins: ["*"]
  methods:
    - GET
    - POST
  headers:
    - Accept
    - Accept-Version
    - Content-Length
    - Content-MD5
    - Content-Type
    - Date
    - X-Auth-Token
  exposed_headers: ['X-Auth-Token']
  credentials: true
  max_age: 3600

and I can see an error message in logs of the ingress-controller pod ‘kong-kong-…’

E0212 09:07:29.113337 1 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”}}}”}
W0212 09:07:29.113360 1 queue.go:112] requeuing kube-system/clusterrole-aggregation-controller-token-mx7p7, 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”}}}”}

what is wrong here? I have my ‘run_on’ parameter in plugin setup.
thank you,
veny

Please upgrade to Controller 0.7.1.

that helped, thank you @hbagdi


© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ