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

watching a virtual service (istio) instead of service #8

Open hhellbusch opened 3 years ago

hhellbusch commented 3 years ago

Is your feature request related to a problem? Please describe. I'm working with a team and we're planning on using blue/green with istio and changing a virtual service (instead of the built-in service). From a cursory look at this project, it seems to only support changes to a service for triggering the HTTP call to the application container or kafka consumer application.

In the event of a team using OpenShift without istio it is common to use a route as the changing object to direct traffic from blue to green. In this pattern, the environment would have two services that are static - one for the blue deployment and another for the green deployment.

Describe the solution you'd like One solution I can think of is refactoring / adding the functionality such that the user can define what sort of object to monitor for change - could be a service, istio's virtual service, or openshift's route for example. Make it flexible where it can monitor and custom resource so that as kubernetes and operators ecosystem continues to grow, this project continues to be a useful way for managing which application version is consuming the events on the kafka bus.

Would love to hear your thoughts on this! Cheers, Henry

brantburnett commented 3 years ago

I think this is an excellent idea, support for additional configurations beyond K8S Services/Endpoints to monitor liveness makes perfect sense. It's also part of why this project is architected in the way it is, the application code only needs to recognize "liveness" and no more. The sidecar can be easily reconfigured/updated to recognize liveness in any way without any changes required to the application code.

That said, however, I personally don't have any experience with OpenShift or Istio. CenterEdge also doesn't currently use them (though we may go to Istio at some point, it's been discussed). So I'm not certain I'd be the best person to make these changes. Is there any chance you'd be interested in putting in PRs? If the main Shawarma sidecar has the updates it needs, I'd be happy to make any related changes to the sidecar injector and how it configures the sidecar.