tczekajlo / kube-consul-register

a tool to register Kubernetes PODs as Consul Services
Apache License 2.0
105 stars 50 forks source link

Only add NodeIPs for nodes running target service #40

Closed zknill closed 6 years ago

zknill commented 6 years ago

Update "service" register mode to only register hostIP:nodePort addresses in consul if the node is actually running a pod matching the service's labelSelector.

This solves the issue where services are registered in consul for all nodes that they could be scheduled on, and not the nodes that they are actually running on.