linkerd2/policy-test
Matei David b5f384f55e
Index ExternalWorkload resources in the policy controller (#11940)
ExternalWorkload resources represent as a resource configuration associated
with a process (or a group of processes) that are foreign to a Kubernetes
cluster. It allows Linkerd to read / write and store configuration for mesh
expansion. Since VMs will be able to receive inbound traffic from a variety of
resources, the proxy should be able to dynamically discover inbound
authorisation policies.

This change introduces a set of callbacks in the indexer that will apply (or
delete) ExternalWorkload resources. In addition, we ensure that
ExternalWorkloads can be processed in a similar fashion to pods (where
applicable, of course) wrt to server matching and defaulting. To serve
discovery requests for a VM, the policy controller will now also start a
watcher for external workloads and allow requests to reference an
`external_workload` target

A quick list of changes:

* ExternalWorkloads can now be indexed in the inbound (policy) index. Renamed
* the pod module in the inbound index to be more generic ("workload"); the
* module has some re-usable building blocks that we can use for external
* workloads. Moved common functions (e.g. building a default inbound server)
* around to share what's already been done without abstracting more or
* introducing generics. Changed gRPC target types to a tuple of `(Workload,
* port)` from a tuple of `(String, String, port)` Added RBAC to watch external
* workloads.

---------

Signed-off-by: Matei David <matei@buoyant.io>
2024-01-17 10:43:43 +00:00
..
src Index ExternalWorkload resources in the policy controller (#11940) 2024-01-17 10:43:43 +00:00
tests Index ExternalWorkload resources in the policy controller (#11940) 2024-01-17 10:43:43 +00:00
Cargo.toml Index ExternalWorkload resources in the policy controller (#11940) 2024-01-17 10:43:43 +00:00
README.md dev: Run policy tests via `just` (#8919) 2022-07-19 14:01:26 -07:00

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.