From 70974dc624a66ace2d70540767ae1158af507f52 Mon Sep 17 00:00:00 2001 From: Xin Rong Date: Wed, 18 Jan 2023 16:46:25 +0000 Subject: [PATCH 1/4] doc: add svc-namespace description to the annotations --- docs/en/latest/concepts/annotations.md | 29 ++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/docs/en/latest/concepts/annotations.md b/docs/en/latest/concepts/annotations.md index 1e9e185361..88b5c70a3e 100644 --- a/docs/en/latest/concepts/annotations.md +++ b/docs/en/latest/concepts/annotations.md @@ -360,3 +360,32 @@ spec: port: number: 50053 ``` + +## Cross namespace reference service + +The value of the annotation should be the namespace of the service. + +In the example configuration below, the Ingress resource in the default namespace references the httpbin service from the test namespace: + +```yaml +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + annotations: + k8s.apisix.apache.org/svc-namespace: test + name: ingress-v1-svc + namespace: default +spec: + ingressClassName: apisix + rules: + - host: httpbin.org + http: + paths: + - path: /ip + pathType: Exact + backend: + service: + name: httpbin + port: + number: 80 +``` From 27d3340beeb9aa2d7c588a7dca6db10550352ba1 Mon Sep 17 00:00:00 2001 From: Xin Rong Date: Sun, 29 Jan 2023 09:21:18 +0800 Subject: [PATCH 2/4] Update docs/en/latest/concepts/annotations.md Co-authored-by: Navendu Pottekkat --- docs/en/latest/concepts/annotations.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/latest/concepts/annotations.md b/docs/en/latest/concepts/annotations.md index 88b5c70a3e..c453d3f8f2 100644 --- a/docs/en/latest/concepts/annotations.md +++ b/docs/en/latest/concepts/annotations.md @@ -365,7 +365,7 @@ spec: The value of the annotation should be the namespace of the service. -In the example configuration below, the Ingress resource in the default namespace references the httpbin service from the test namespace: +In the example configuration below, the Ingress resource in the `default` namespace references the httpbin service in the `test` namespace: ```yaml apiVersion: networking.k8s.io/v1 From cfbdef3d25c0e0df66e2c47162815eb42ea73e4d Mon Sep 17 00:00:00 2001 From: Xin Rong Date: Sun, 29 Jan 2023 09:43:37 +0800 Subject: [PATCH 3/4] Update annotations.md --- docs/en/latest/concepts/annotations.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/latest/concepts/annotations.md b/docs/en/latest/concepts/annotations.md index c453d3f8f2..906667e918 100644 --- a/docs/en/latest/concepts/annotations.md +++ b/docs/en/latest/concepts/annotations.md @@ -361,9 +361,9 @@ spec: number: 50053 ``` -## Cross namespace reference service +## Cross-namespace reference service -The value of the annotation should be the namespace of the service. +This annotation can be used to route to services in a different namespace. In the example configuration below, the Ingress resource in the `default` namespace references the httpbin service in the `test` namespace: From 602035c69c8d681f66b4202f4d263c3d9d0981a2 Mon Sep 17 00:00:00 2001 From: Xin Rong Date: Mon, 30 Jan 2023 11:52:08 +0800 Subject: [PATCH 4/4] Update annotations.md --- docs/en/latest/concepts/annotations.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/latest/concepts/annotations.md b/docs/en/latest/concepts/annotations.md index 906667e918..4f0bd93a49 100644 --- a/docs/en/latest/concepts/annotations.md +++ b/docs/en/latest/concepts/annotations.md @@ -361,7 +361,7 @@ spec: number: 50053 ``` -## Cross-namespace reference service +## Cross-namespace references This annotation can be used to route to services in a different namespace.