DEV Community

Cover image for Bootstrapping ArgoCD with Helm and Helmfile
Sibelius Seraphini for Woovi

Posted on

3

Bootstrapping ArgoCD with Helm and Helmfile

Bootstrapping ArgoCD with Helm and Helmfile

ArgoCD is a powerful tool for managing GitOps workflows in Kubernetes. Combining it with Helm and Helmfile streamlines the setup process, enabling version-controlled configurations and better automation.

In this article, we’ll walk through setting up ArgoCD using Helm and managing it with Helmfile for an efficient and maintainable deployment process.

Why Use Helm and Helmfile for ArgoCD?

  • Helm simplifies application packaging and deployment in Kubernetes.
  • Helmfile extends Helm by managing multiple Helm charts and their configurations declaratively.
  • Combining Helmfile and Helm for ArgoCD ensures consistent and reproducible setups, especially in environments with multiple clusters or teams.

Prerequisites

Before starting, ensure the following are in place:

A Kubernetes cluster.
Helm installed (helm version).
Helmfile installed (helmfile version).
A Git repository to store your Helmfile and values files.

Step 1: Add the ArgoCD Helm Repository

First, add the official ArgoCD Helm repository:

helm repo add argo https://argoproj.github.io/argo-helm
helm repo update
Enter fullscreen mode Exit fullscreen mode

Step 2: Create a helmfile.yaml

Create a helmfile.yaml to manage the ArgoCD Helm chart. Here’s a basic example:

repositories:
  - name: argo
    url: https://argoproj.github.io/argo-helm

releases:
  - name: argocd
    namespace: argocd
    createNamespace: true
    chart: argo/argo-cd
    version: ~5.46.0  # Specify the desired version
    values:
      - values/argocd-values.yaml
Enter fullscreen mode Exit fullscreen mode

Step 3: Define Values for ArgoCD

In the values/argocd-values.yaml file, customize the ArgoCD configuration. Example:

argo-cd:
  dex:
    enabled: false
  notifications:
    enabled: false
  applicationSet:
    enabled: false
  server:
    extraArgs:
      - --insecure
Enter fullscreen mode Exit fullscreen mode

Adjust these values based on your environment, such as enabling ingress or setting up replicas for HA.

Step 4: Deploy ArgoCD with Helmfile

Run the following command to deploy ArgoCD:

helmfile apply
Enter fullscreen mode Exit fullscreen mode

This will:

Create the argocd namespace (if not already existing).
Install or upgrade the ArgoCD Helm chart using the specified values.

Step 5: Verify the Installation

Check the status of the deployment:

kubectl get pods -n argocd
Enter fullscreen mode Exit fullscreen mode

Access the ArgoCD UI (replace LoadBalancer or ingress domain accordingly):

kubectl port-forward svc/argocd-server -n argocd 8080:443
Enter fullscreen mode Exit fullscreen mode

The default username is admin, and the password can be fetched using:

kubectl get secret argocd-initial-admin-secret -n argocd -o jsonpath="{.data.password}" | base64 -d
Enter fullscreen mode Exit fullscreen mode

Step 6: Manage Configuration with GitOps

Now that ArgoCD is set up, you can manage your Kubernetes applications declaratively using Git repositories.

Advantages of Using Helmfile for ArgoCD

  • Centralized Configurations: All charts and values are in one file, making it easy to track changes.
  • Reproducibility: Deployments are consistent across environments.
  • Multi-environment Support: Define multiple environments (e.g., dev, staging, production) in a single Helmfile.

Final Thoughts

Bootstrapping ArgoCD with Helm and Helmfile is a powerful way to simplify and streamline GitOps workflows. With the declarative nature of Helmfile, you can easily manage and version-control your ArgoCD setup, ensuring smooth operations across your Kubernetes clusters.

Feel free to extend this setup further by incorporating secrets management tools, custom plugins, or CI/CD pipelines for automated deployments.

Did you find this guide helpful? Share your thoughts or tips for improving the ArgoCD setup using Helm and Helmfile in the comments!


Woovi is a fintech platform revolutionizing how businesses and developers handle payments in Brazil. Built with a developer-first mindset, Woovi simplifies integration with instant payment methods like Pix, enabling companies to receive payments seamlessly and automate financial workflows.

If you want to work with us, we are hiring!

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (0)

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay