Multi-tenancy, in the context of Kong Operator, is an approach that allows multiple instances of the Kong Operator to share the same underlying infrastructure while keeping their data isolated and more specifically to watch disjoint namespaces.
This allows you to configure Kong Operator itself to watch namespaces instead of always specifying them in the ControlPlane
resources.
Important: If you configure watch namespaces on both Kong Operator and ControlPlane
resources, they must be configured so that they don’t conflict. For example, if the Kong Operator watches namespaces A and B, the ControlPlane
resource can only define watch namespaces A and B. If you use other watch namespaces, such as namespace C, the ControlPlane
object will receive an appropriate status condition and won’t reconcile your configuration.
You can set watch namespaces for Kong Operator using several methods:
When using the kong-operator
Helm chart, you can use the env
top level configuration in your values.yaml
:
env:
watch_namespace: namespace-a,namespace-b
KONG_OPERATOR_WATCH_NAMESPACES='namespace-a,namespace-b'
To specify the comma separated list of namespaces to watch you can use the --watch-namespaces
flag:
... --watch-namespaces namespace-a,namespace-b ...