Blog

StackGen Removes Developer Friction for Argo CD

Written by Asif Awan | Oct 8, 2024 12:00:00 PM

Automation is essential to modern software development. The more we automate repetitive tasks, the faster we meet customer requirements. Automation improves speed and efficiency, consistency and reliability, and scalability. So as we look to cloud native workloads, we must automate as much of infrastructure provisioning and application deployment as possible.

That’s where open source projects like Argo CD have really helped move Kubernetes and cloud native adoption forward. “Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes.” It enables “automatic deployment of applications to a Kubernetes cluster and automatic synchronization of application state to the current version of declarative configuration,” amongst other features and capabilities

How Argo CD Works

Argo CD uses a method called GitOps, where Git (a version control system) is the central place that stores the desired state of an application. This means Argo CD automatically keeps your applications running exactly as described in the files stored in a Git repository. Applications can be defined in various formats like Kustomize or plain directories of YAML/JSON, but for this blog post, we are going to focus on Helm charts, templates for defining Kubernetes resources. 

Argo CD monitors Helm charts to make sure Kubernetes applications are always in sync with what’s specified in Git. The added value of Argo CD is that it is a push and pull continuous deployment tool. Whenever there is a change in the  application or its deployment configuration, it matches the deployed state. 

While this automated synchronization is powerful for developers making changes to an application, it still requires an environment where the application workload is deployed. To use an analogy, Argo CD is your approved plan to build a house. Now it needs to know where you are building that house: what plot of land within a cul-de-sac for example. 

Developers need to create that “house plan" — the Helm chart — somehow (whether that is by updating some templates lying around, begging someone for help or borrowing code) to get an application deployed to the “plot of land” — your infrastructure environment. This is where the software development lifecycle can introduce lag. 

Developers are not necessarily Helm chart experts. They are also, most likely, not Argo CD experts (thank you DevOps teams for setting up Argo CD!). But they do need to deploy applications, and want to get those Helm charts in Argo CD as quickly as possible. Delays in writing charts slow down the entire process. 

Infrastructure from Code Auto-Generates Helm Charts

Infrastructure from Code, the ability to auto-generate infrastructure as code (IaC) based on your application’s requirements helps remove friction from that deployment process. Developers can stop writing Helm charts and instead use Infrastructure from Code to generate them. 

Developers focus on writing application code. When ready, they can use StackGen, an Infrastructure from Code solution. StackGen statically analyzes the source code and infers all the infrastructure dependencies and how the application should be deployed  to generate the Helm charts needed. Developers can use StackGen’s approach to visualize exactly what the provisioned infrastructure resources will look like, enhance them with drag and drop functionality and then, once they are happy with it, have StackGen generate the Helm chart and push to a Git location. This removes an organizational dependency that could take a few hours to up to a few weeks (depending on the organization). Once created by StackGen, that Helm chart can be picked up by your Argo CD workflows. 

Keeping Helm Charts in Sync with Application Code

Argo CD does a great job of keeping the application state in sync with the current version of declarative configurations in Helm charts. StackGen helps ensure that the Helm chart is in sync with the application source code; thereby ensuring that the application source code, Helm chart and the actual application deployments are all in sync.

Benefits to Using StackGen and Argo CD

Organizations using Argo CD for continuous deployment benefit from synchronized environments that maintain (or increase) velocity at scale. Using StackGen’s infrastructure from Code solution helps users and organizations extend that synchronicity all the way to the application code and continue to support consistency and speed at scale. 

Infrastructure from Code also provides the additional benefit of security and compliance by default. Whatever your standards may be, for example least-privilege access control, StackGen will by default create Helm charts that comply with all these standards. Not only do you have the benefits of Argo CD - security, scale,, monitoring and alerting, you also have the  default standards enforced in your Helm charts. 

Essentially you are automating more of your deployment process and reducing human error, by enabling your developers to ship code faster and your DevOps teams to ensure the process is working to support developer enablement. 

Create your first Helm chart with StackGen’s infrastructure from code.