openyurtio / raven

provide layer 3 and layer 7 network connectivity among pods in different physical regions
Apache License 2.0
57 stars 37 forks source link

[Raven-L7] Endpoints manager implementation #69

Open zzguang opened 2 years ago

zzguang commented 2 years ago

As proposal https://github.com/openyurtio/openyurt/blob/master/docs/proposals/20220930-unifying-cloud-edge-comms.md mentioned: we need to implement the endpoints manager in raven-controller-manager to handle the l7 proxy server selection.

Generally, raven l7 server is exposed as a service on cloud side, when users access edge side through kubectl logs/exec or prometheus/metrics server, the access request needs to be intercepted by the l7 proxy server firstly. Since l7 proxy server will be launched only on cloud gateway nodes, and the l7 proxy server is implemented as part of raven-agent instead of a standalone pod, we can not leverage k8s service mechanism to handle raven l7 server endpoints selection directly. So we need to implement the endpoints manager to take the responsibility of raven proxy server endpoints selection for the corresponding service.

It mainly includes the tasks below:

  1. Dynamically update the raven l7 proxy server service endpoints according to the l7 servers state.
  2. When user request arrives, select the proper l7 server endpoints to handle the user request.
River-sh commented 2 years ago

/assign @River_sh