Kuadrant / policy-machinery

Machinery for implementing Gateway API policies
Apache License 2.0
8 stars 2 forks source link

Make topology implement the API client interface #32

Open guicassolato opened 1 week ago

guicassolato commented 1 week ago

For convenience when navigating a topology to find or list resources, the Topology struct, as well as the collection type, could implement a more widely known Client interface for reading resources otherwise from the API server.

controller-runtime's Reader can be a good candidate for this. client-go's ResourceInterface and NamespaceableResourceInterface can be alternatives although these are less specific.

This capability would be especially useful to adapting existing logic to work with the Policy Machinery.

Suggested by @philbrookes