logo

Dynamically Testing Individual Microservice Releases In Production

2022-10-28

Authors:   Matt Turner


Summary

The presentation discusses continuous deployment and release in the context of microservices and Kubernetes. It emphasizes the importance of testing in context and introduces Flagger as a sophisticated way of doing a rolling update.
  • Continuous deployment and release in microservices
  • Importance of testing in context
  • Flagger as a sophisticated way of doing a rolling update
The speaker explains that in order to test a service in context, it needs to be subject to real runtime resource and security constraints. This can be achieved by deploying it to an environment and using test scripts to call in and out. However, for end-to-end testing, it is necessary to exercise the service in the context of the whole chain or graph. The speaker suggests using a staging environment where all new versions are deployed, but notes that this is not representative because these are not versions if we're testing. Instead, the speaker introduces Flagger as a sophisticated way of doing a rolling update, which allows for a combination of testing in isolation and testing with real user traffic.

Abstract

A lot of us test new versions of services in our Production environment, since it's the best way to get representative, reliable results. If the new service is "on the edge" of the topology then hitting it is easy, as the test clients can directly call it. But if it's in the middle of a chain of services, then calling the current versions of all of them, except one beta version in the middle of the chain, is the dream. This kind of advanced traffic control is possible with a Service Mesh like Istio. But the configuration needed to enable this for all versions of all services is complex and error-prone. In this session Matt will show you how to use an Operator which auto-generates the necessary config. We'll see how just deploying a new version results in all the necessary config for sophisticated "override-based testing". Matt will walk through the technique, the underlying config, and the operator that generates it from Deployments.

Materials: