ServiceWeaver / weaver-kube

Run Service Weaver applications on vanilla Kubernetes.
Apache License 2.0
61 stars 19 forks source link

Replaced internal services with pod watching. #39

Closed mwhittaker closed 1 year ago

mwhittaker commented 1 year ago

Before this PR, weavelets communicated with one another via a Kubernetes service. This had two problems. First, a weavelet would try to contact the service before any backing pods started, which led to crashes. Second, a weavelet would contact the service to get an IP address and then use this IP address for all future calls, effectively bypassing our load balancing entirely.

This PR fixes the issues by directly watching pods and getting their IP addresses rather than using a service. I believe the internal services we generate are now not needed, but I need to double check and will delete it in a future PR.