KongPlugin reload

Hi all,

I’m trying to figure out how Kong Ingress Controller reloads plugin config. I have Ingress resource with attached KongIngress:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    konghq.com/override: kong-echo
    kubernetes.io/ingress.class: kong-ingress
    plugins.konghq.com: test-whitelist
    ...

apiVersion: configuration.konghq.com/v1
kind: KongIngress
metadata:
  annotations:
    kubernetes.io/ingress.class: kong-ingress
  name: kong-echo
  namespace: default
route:
  methods:
  - GET

Here is plugin config:

apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
  name: test-whitelist
config:
  whitelist:
    - x.x.x.x
plugin: ip-restriction

All works fine when plugin is attached to ingress for the first time but when I update IP address in the plugin the change seems to take effect only occasionally and after quite some delay. I’m running DB-less mode.

Can someone describe me how Kong Ingress Controller reloads resources like plugins?

Thanks,
Martin

I think I found the problem. I’m using custom ingress class (kong-ingress) so if I add kubernetes.io/ingress.class: kong-ingress annotation to KongPlugin changes take effect immediately.

Yeah, this is an annoying issue that causes a lot of problems.

We have a document to fix such issues with custom ingress class.
Your comments would be very helpful:


© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ