Custom plugin as Global

Hi all,

I’ve managed to get a custom plugin working with Kong Ingress Controller but unable to set the plugin at a global level. I followed this guide to get the custom plugin working with a ConfigMap and changing some of the deployment variables.

If I assign the annotation to the ingress rule then the plugin works and I can see a custom header being set.

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: demo
  annotations:
    kubernetes.io/ingress.class: 'kong'
    plugins.konghq.com: 'myheader'
spec:
  rules:
    - http:
        paths:
          - path: /foo
            backend:
              serviceName: echo
              servicePort: 80

But when I try to set the plugin at a global level as well as commenting out the annotation on the ingress, then I can’t see the custom header coming through. Has anyone experienced this before?

apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
  name: myheader
  namespace: kong
  labels:
    global: 'true'
plugin: myheader

Any help greatly appreciated.

Ignore this please - I had conflicting plugins with the same name that meant the plugin could not be set at a global level.