I have a Kong introspection plugin and would like the introspection url to pull the data from a kubernetes secret. Is this possible?
apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
name: oauth2-introspection
namespace: app
annotations:
kubernetes.io/ingress.class: kong
consumerRef:
plugin: oauth2-introspection
config:
introspection_url: **<k8-secret>**
Kong Ingress Controller allows you to configure plugins using the contents of a Kubernetes secret. The
configFrom
field in theKongPlugin
resource allows you to set asecretKeyRef
pointing to a Kubernetes secret.This only works for a COMPLETE configuration. You can not configure individual fields.
This
KongPlugin
definition points to a secret namedrate-limit-redis
that contains a complete configuration for the plugin:The
rate-limit-redis
secret contains a complete configuration as a string:KIC will resolve the secrets, build a complete configuration object and send it to Kong Gateway