Hey everyone! I'm working as a developer in a multinational corporation, and we frequently build applications that need to handle about a million hits a day. With around 20 to 40 clients, each project is pretty substantial, and we're adding new customers constantly. Our plan is to use lower-quality, less expensive solutions like RabbitMQ and Kafka for our Development and QA environments. But for higher environments like SIT, UAT, and Production, we want to implement secure features like mTLS and clustering with high-quality infrastructure.
We deploy everything using Kubernetes, and I'm trying to figure out the best way to handle environment-specific JAR files. Should I use initContainers or is there a better approach? Also, I've got around 20 different infrastructure combinations for our clients, and running them separately wouldn't be financially viable. While our tool segregates the infra-related JARs from the main source, the challenge remains in how to deploy everything correctly. Any help or resources would be greatly appreciated!
1 Answer
Honestly, using environment-specific JARs is a bit of a backward approach. The better practice is to utilize feature gates and environment variables or config files to toggle functionalities or endpoints while keeping the same build. Just make sure your CI/CD pipeline is set up to deploy environment-specific images instead. It’ll save you a lot of headaches down the line!

That makes sense! We actually have our platform set up to separate source code from infrastructure-related configurations, so the source code is bundled into one image while the infra components could be handled as another image using initContainers, right?