Skip to content

Commit

Permalink
Merge pull request #738 from hhovsepy/issue6918_2
Browse files Browse the repository at this point in the history
KIA1402 - Added info about ReferenceGrant.
  • Loading branch information
hhovsepy authored Dec 22, 2023
2 parents 9bf63f9 + 315f58a commit ceda7ba
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
8 changes: 6 additions & 2 deletions content/en/docs/Features/validations.md
Original file line number Diff line number Diff line change
Expand Up @@ -962,11 +962,14 @@ 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

Expand All @@ -981,6 +984,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)



Expand Down
16 changes: 15 additions & 1 deletion static/files/validation_examples/1402.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit ceda7ba

Please sign in to comment.