linkerd2/policy-controller/src
Alex Leong 221e233f3d
Add index_list to remove redundant kubert watches (#10548)
The policy controller has several indexes: the inbound index, the outbound index, and the status index, each for different purposes, but each needing an overlapping set of Kubert resource watches.  This has led to having duplicated kubert watches for the same type when it is needed by multiple indexes (e.g. all 3 indexes need to watch HttpRoute).  We previously introduced a IndexPair type which fans out watch updates to 2 indexes, but this is no longer sufficient now that we have 3 indexes.

We replace IndexPair with IndexList which can hold any number of indexes for a resource.  We reorganize the policy controller's main to establish only one kubert watch for each resource and then use IndexList to fan updates out to the relevant indexes.

Signed-off-by: Alex Leong <alex@buoyant.io>
2023-03-16 14:44:50 -07:00
..
admission.rs Modularize policy controller (#10524) 2023-03-15 16:42:57 -07:00
index_list.rs Add index_list to remove redundant kubert watches (#10548) 2023-03-16 14:44:50 -07:00
lib.rs Add index_list to remove redundant kubert watches (#10548) 2023-03-16 14:44:50 -07:00
main.rs Add index_list to remove redundant kubert watches (#10548) 2023-03-16 14:44:50 -07:00