CenterEdge / shawarma

A Kubernetes sidecar to assist with enabling/disabling background processing during blue/green deployments.
Apache License 2.0
11 stars 4 forks source link

Add active services to DTO #25

Closed brantburnett closed 2 years ago

brantburnett commented 2 years ago

Motivation

When monitoring multiple services via labels, there may be cases where the list of active services is valuable to the application.

Modifications

Add the list of active services to the DTO. Change the state tracking for endpoints to uses names instead of UID so we have the names to send.

Rewrite the monitor into a class and use channels to queue the state changes. This ensures that state changes are delivered in order and without thread sync issues when multiple changes happen quickly.

Move stop logic based on SIGTERM/SIGINT out of the monitor and into the command line system, which makes more sense.

brantburnett commented 2 years ago

/merge