This is an automated email from the ASF dual-hosted git repository. traky pushed a commit to branch parameters-namespace in repository https://gitbox.apache.org/repos/asf/apisix-ingress-controller.git
commit e496e505ee44573044b462b015067ed800a98300 Author: traky <[email protected]> AuthorDate: Tue Jan 13 11:15:47 2026 +0800 add annotation apisix.apache.org/parameters-namespace --- docs/en/latest/reference/ingress-annotation.md | 28 +++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/docs/en/latest/reference/ingress-annotation.md b/docs/en/latest/reference/ingress-annotation.md index bb68422a..3237d651 100644 --- a/docs/en/latest/reference/ingress-annotation.md +++ b/docs/en/latest/reference/ingress-annotation.md @@ -51,6 +51,7 @@ This document describes all available annotations and their uses. | `k8s.apisix.apache.org/http-block-methods` | | `k8s.apisix.apache.org/auth-type` | | `k8s.apisix.apache.org/svc-namespace` | +| `apisix.apache.org/parameters-namespace` | ## Annotation Details @@ -272,8 +273,9 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: cross-namespace-ingress + namespace: aic # Ingress is in aic namespace annotations: - k8s.apisix.apache.org/svc-namespace: "other-namespace" + k8s.apisix.apache.org/svc-namespace: "other-namespace" # Service is in other-namespace spec: ingressClassName: apisix rules: @@ -288,6 +290,30 @@ spec: number: 80 ``` +### Cross Namespace GatewayProxy Access + +The `apisix.apache.org/parameters-namespace` annotation allows you to specify a custom namespace for GatewayProxy resources referenced by IngressClass. This is useful when your GatewayProxy resources are in a different namespace than your IngressClass. + +The annotation takes precedence over the `parameters.namespace` field in the IngressClass spec. If neither is specified, it defaults to the `default` namespace. + +For example: + +```yaml +apiVersion: networking.k8s.io/v1 +kind: IngressClass +metadata: + name: apisix + namespace: aic # IngressClass is in aic namespace + annotations: + apisix.apache.org/parameters-namespace: apisix-system # GatewayProxy is in apisix-system namespace +spec: + controller: apisix.apache.org/ingress-controller + parameters: + apiGroup: apisix.apache.org + kind: GatewayProxy + name: apisix-config +``` + ### Proxy Rewrite These annotations allow you to rewrite request paths before forwarding them to the upstream service. They correspond to the functionality of the `proxy-rewrite` plugin in APISIX.
