Closed roivaz closed 1 year ago
/ok-to-test
/lgtm
LGTM label has been added.
/lgtm
LGTM label has been added.
/approve
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: roivaz
The full list of commands accepted by this bot can be found here.
The pull request process is described here
Description
With this PR, the discovery service gains the ability to discover and feed a list of Pod IPs to a subscribed consumer. The endpoints are discovered by watching the EndpointSlices resources in the namespace that match a given label selector.
An endpoint resource would have to be declared like
This would make the discovery service watch the EndpointSlices generated by the k8s Service named
test
. Any other custom label selector can be used.The (debug) logs in the discovery service show how the list of pod IPs is generated and feed to consumers:
The health status of each endpoint is provided so the consumer can make appropriate load balancing decisions.
/kind feature /priority important-soon /assign
This PR depends on #177 being merged first.
How to test
make kind-create
export KUBECONFIG=${PWD}/kubeconfig
kubectl apply -f examples/e2e/deployment
Check the logs of the discovery service and the endpoint pod in the
default
namespace to see how the list of endpoints is updated each time the number of replicas in the nginx deployment is changed.