KongIngress proxy doesn't work

I’m having trouble getting KongIngress to override any service values using the following config (KIC 0.8.1, Kong 2.0.3)

apiVersion: configuration.konghq.com/v1
kind: KongIngress
metadata:
  name: api-config
  namespace: test
proxy:
  protocol: http
  path: /
  connect_timeout: 10000
  retries: 10
  read_timeout: 10000
  write_timeout: 10000

I then add the following annotation to my ingress

konghq.com/override: api-config

But then everything remains at defaults for the service according to the Admin API

curl -s https://kongadmin.mydomain/services/test.api.http | jq
{
  "host": "api.test.http.svc",
  "created_at": 1588208792,
  "connect_timeout": 60000,
  "id": "504525f8-9707-50fe-ac55-34d3753bf12c",
  "protocol": "http",
  "name": "test.api.http",
  "read_timeout": 60000,
  "port": 80,
  "path": "/",
  "updated_at": 1588208792,
  "client_certificate": null,
  "tags": null,
  "write_timeout": 60000,
  "retries": 5
}

That said, if I edit and define things like methods under route: I see the changes reflected under the Admin API. So it seems like things are linked together correctly and I just can’t override any of the service configs. Am I doing something wrong or looking at the wrong thing?

You need to put the annotation on the k8s service for service-level overrides.

Ahh, thank you! I missed that detail in the documentation:

I added it to the k8s service and the proxy values updated as configured. One special note if others come by and see this. To get that to work if you’ve changed kubernetes.io/ingress.class you also need to add that as well as konghq.com/override to your k8s service.


© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ