mirror of https://github.com/linkerd/linkerd2.git
When the `namespace` field of a `backend_ref` of an `HttpRoute` is set, Linkerd ignores this field and instead assumes that the backend is in the same namespace as the parent `Service`. To properly handle the case where the backend is in a different namespace from the parent `Service`, we change the way that service metadata is stored in the policy controller outbound index. Instead of keeping a separate service metadata map per namespace, we maintain one global service metadata map which is shared between all namespaces using an RwLock. This allows us to make the two necessary changes: 1. When validating the existence of a backend service, we now look for it in the appropriate namespace instead of the Service's namespace 2. When constructing the backend authority, we use the appropriate namespace instead of the Service's namespace We also add an API test for this situation. Signed-off-by: Alex Leong <alex@buoyant.io> |
||
|---|---|---|
| .. | ||
| src | ||
| tests | ||
| Cargo.toml | ||
| README.md | ||
README.md
Policy controller tests
The policy-test crate includes integration tests for the policy controller.
Running locally
:; just policy-test
Running in CI
See the workflow.