tczekajlo / kube-consul-register

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

Unable to deregister critical service when KCR/consul server is down #49

Open snaveen opened 4 years ago

snaveen commented 4 years ago

Currently when KCR is down, no de-register event is fired when a pod is deleted. Even when KCR comes back up, the pod is not de-registered.

This can be solved by having the ability to configure the DeregisterCriticalServiceAfter. This will be part of the check when a pod registers. Refer here for sample Payload. Even if KCR dies, when it comes back up, since the consul service is registered with this parameter, consul will deregister the service after the configure period.