What would be best way to pick up values from k8s secret in KongPlugin
config?
apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
(...)
config:
add:
header:
- Authorization:Basic $(<<reading from K8S secret >>)
plugin: request-transformer
Should I create an own version of this plugin, where value should be an
name of secret and then read value of secret in lua code? (is it possible?)
Or is there any other way get values from secrets?
Business reason: avoid to keep confidential values in repository with KongPlugin
configuration.
hbagdi
August 14, 2020, 7:49pm
2
You can use configFrom
to supply the entire configuration from a secret:
# Custom Resource Definitions
The Ingress Controller can configure Kong specific features
using several [Custom Resource Definitions(CRDs)][k8s-crd].
Following CRDs enables users to declaratively configure all aspects of Kong:
- [**KongPlugin**](#kongplugin): This resource corresponds to
the [Plugin][kong-plugin] entity in Kong.
- [**KongIngress**](#kongingress): This resource provides fine-grained control
over all aspects of proxy behaviour like routing, load-balancing,
and health checking. It serves as an "extension" to the Ingress resources
in Kubernetes.
- [**KongConsumer**](#kongconsumer):
This resource maps to the [Consumer][kong-consumer] entity in Kong.
- [**TCPIngress**](#tcpingress):
This resource can configure TCP-based routing in Kong for non-HTTP
services running inside Kubernetes.
- [**KongCredential (Deprecated)**](#kongcredential-deprecated):
This resource maps to
This file has been truncated. show original