From b337797e73513040183293121296b42061b74cbb Mon Sep 17 00:00:00 2001 From: Hayk Hovsepyan Date: Thu, 21 Dec 2023 09:25:27 +0100 Subject: [PATCH 1/2] KIA1402 - Added info about ReferenceGrant. --- content/en/docs/Features/validations.md | 5 +++-- static/files/validation_examples/1402.yaml | 16 +++++++++++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/content/en/docs/Features/validations.md b/content/en/docs/Features/validations.md index e5b492de9..93ddbd242 100644 --- a/content/en/docs/Features/validations.md +++ b/content/en/docs/Features/validations.md @@ -962,11 +962,11 @@ Fix the parentRefs field to target to an existing gateway. ### KIA1402 - BackendRef on rule doesn't have a valid service (Service name not found) -Gateway API HTTPRoute could be pointing to a Service inside your mesh the Route sends the traffic to. A Service name should be specified, not a hostname. This Service can be a certain version of a parent Service, but in that case a separate Service is required to be created. When the namespace field is not specified it takes Service from the current HTTPRoute's namespace. Here the error indicates that the referenced Service is not found in the provided namespace. +Gateway API HTTPRoute could be pointing to a Service inside your mesh the Route sends the traffic to. A Service name should be specified, not a hostname. This Service can be a certain version of a parent Service, but in that case a separate Service is required to be created. When the namespace field is not specified it takes Service from the current HTTPRoute's namespace. In a case of referencing to a Service from remote namespace, a ReferenceGrant object needs to be created to enable cross namespace references. Here the error indicates that the referenced Service is not found in the provided namespace or the ReferenceGrant is missing (in a case of remote namespace). #### Resolution -Correct the backendRefs name to point to a correct Service (in this namespace or to other namespaces), deploy the missing Service to the mesh or remove the configuration linking to that non-existing Service. +Correct the backendRefs name to point to a correct Service (in this namespace or to other namespaces), deploy the missing Service to the mesh, create a ReferenceGrant object in a case of remote namespace or remove the configuration linking to that non-existing Service. #### Severity @@ -981,6 +981,7 @@ Correct the backendRefs name to point to a correct Service (in this namespace or #### See Also - [Validator source code](https://github.com/kiali/kiali/blob/master/business/checkers/k8shttproutes/no_host_checker.go) +- [Reference Grant](https://gateway-api.sigs.k8s.io/api-types/referencegrant) diff --git a/static/files/validation_examples/1402.yaml b/static/files/validation_examples/1402.yaml index ae1441301..c5886f2ef 100644 --- a/static/files/validation_examples/1402.yaml +++ b/static/files/validation_examples/1402.yaml @@ -20,5 +20,19 @@ spec: - group: '' kind: Service name: reviews-v1 + namespace: default port: 9080 - +--- +apiVersion: gateway.networking.k8s.io/v1beta1 +kind: ReferenceGrant +metadata: + name: refgrant + namespace: default +spec: + from: + - group: gateway.networking.k8s.io + kind: HTTPRoute + namespace: bookinfo + to: + - group: "" + kind: Service From 315f58a4b6ea8bb42d04ee36cf5b4a34774652c2 Mon Sep 17 00:00:00 2001 From: Hayk Hovsepyan Date: Thu, 21 Dec 2023 16:59:42 +0100 Subject: [PATCH 2/2] comments aproached --- content/en/docs/Features/validations.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/content/en/docs/Features/validations.md b/content/en/docs/Features/validations.md index 93ddbd242..6a282a9d6 100644 --- a/content/en/docs/Features/validations.md +++ b/content/en/docs/Features/validations.md @@ -966,7 +966,10 @@ Gateway API HTTPRoute could be pointing to a Service inside your mesh the Route #### Resolution -Correct the backendRefs name to point to a correct Service (in this namespace or to other namespaces), deploy the missing Service to the mesh, create a ReferenceGrant object in a case of remote namespace or remove the configuration linking to that non-existing Service. +Correct the backendRefs name to point to a correct Service (in this namespace or to other namespaces): + +- Deploy the missing Service to the mesh, create a ReferenceGrant object in a case of remote namespace. +- Or remove the configuration linking to that non-existing Service. #### Severity