By default, Kong Operator restricts references to resources within the same namespace for security. To enable cross-namespace references, you must use one of the following resources in the target namespace:
-
ReferenceGrant: A standard Kubernetes Gateway API resource used for authorizing references from Gateway API resources to other resources. -
KongReferenceGrant: A Kong-specific resource used for authorizing references from Kong resources to other resources.
This example demonstrates using both ReferenceGrant and KongReferenceGrant to allow a Gateway in the kong namespace to reference a TLS Secret in the secret-ns namespace.