-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat/endpoint-discovery #179
Conversation
097c497
to
b4bdc1c
Compare
/ok-to-test |
b4bdc1c
to
fc64ef0
Compare
/lgtm |
LGTM label has been added. Git tree hash: 81800917772288d9c3e16de13b4135d015d45522
|
/lgtm |
LGTM label has been added. Git tree hash: c10f7633594ff2bf58d1b7bbe2054d47596dd632
|
afe0a3d
to
fc64ef0
Compare
/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
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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.