linkerd2/policy-controller
Matei David 2b6760c824
Add status support for BackendReferences (#10601)
A route may have two conditions in a parent status: a condition that
states whether it has been accepted by the parents, and a condition that
states whether all backend references -- that traffic matched against
route is sent to -- have resolved successfully. Currently, the policy
controller does not support the latter.

This change introduces support for checking and setting a backendRef
specific condition. A successful condition (ResolvedRefs = True) is met
when all backend references point to a supported type, and that type
exists in the cluster. Currently, only Service objects are supported. A
nonexistent object, or an unsupported kind will reject the entire
condition; the particular reason will be reflected in the condition's
message.

Since statuses are set on a route's parents, the same condition will
apply to _all_ parents in a route (since there is no way to elicit
different backends for different parents).

If a route does not have any backend references, then the parent
reference type will be used. As such, any parents that are not Services
will automatically get an invalid backend condition (exception to the
rule in the third paragraph where a condition is shared by all parents).
When the parent is supported (i.e a Service) we needn't check its
existence since the parent condition will already reflect that.

---

Signed-off-by: Matei David <matei@buoyant.io>
Co-authored-by: Eliza Weisman <eliza@buoyant.io>
Co-authored-by: Oliver Gould <ver@buoyant.io>
2023-03-29 12:31:33 +01:00
..
core Modularize policy controller (#10524) 2023-03-15 16:42:57 -07:00
grpc Send queue config even when outbound backend service is missing (#10634) 2023-03-28 11:12:11 -07:00
k8s Add status support for BackendReferences (#10601) 2023-03-29 12:31:33 +01:00
src Set accepted status for HTTPRoutes with Service parents (#10545) 2023-03-21 17:18:30 -07:00
.dockerignore Import the linkerd-policy-controller (#6485) 2021-08-11 12:56:12 -07:00
Cargo.toml build(deps): bump openssl from 0.10.46 to 0.10.48 (#10615) 2023-03-24 08:36:02 -07:00
Dockerfile Add support to cross-build policy controller (#10334) 2023-02-20 11:22:08 +00:00