Logo

Armand.nz

Home / About / Linkedin / Github

ArgoCD Application vs ApplicationSets

#argoCD #ApplicationSet #Application #kubernetes #devops |

Introduction

When I first began using ArgoCD to manage continuous deployment to manage the homelab, I quickly learned that ArgoCD provides two discovered deployments: ArgoCD Applications and ApplicationSet. I had to figure out the differences between these options to choose the right tool for the job and set up an effective deployment workflow without going overboard.

What is ArgoCD?

Before we dive into the comparison, let’s see what ArgoCD is. ArgoCD is a declarative, GitOps-based continuous delivery tool for Kubernetes. It allows you to manage and define the desired state of your applications straight from a Git repository, automating deployments and keeping things consistent across environments.

Applications vs ApplicationSet

Application

An Application in ArgoCD is a single deployment unit that defines the desired state of a Kubernetes application. It directly references a Git repository containing the application manifests (deployment manifests, helm, etc), which ArgoCD uses to sync and manage the applications on the Kubernetes cluster.

When to Use an Application:

Use Case Example:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: standalone-service
spec:
  project: default
  source:
    repoURL: 'https://github.com/example/standalone-service.git'
    targetRevision: HEAD
    path: chart
    helm:
	valueFiles:
		- ../values.yaml
  destination:
    server: 'https://kubernetes.default.svc'
    namespace: staging
  syncPolicy:
    automated: {}

What is an ApplicationSet?

An ApplicationSet is a more advanced resource that allows the dynamic generation of multiple Applications based on a template and parameters. This is particularly useful for managing large-scale environments and handling multiple instances of applications with varied configurations.

When to Use an ApplicationSet:

Use Case Example:

apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
  name: e-commerce-platform
spec:
  generators:
    - list:
        elements:
          - cluster: us-west
            url: 'https://us-west.example.com'
          - cluster: eu-central
            url: 'https://eu-central.example.com'
  template:
    metadata:
      name: 'e-commerce-'
    spec:
      project: default
      source:
        repoURL: 'https://github.com/example/e-commerce.git'
        targetRevision: HEAD
        path: 'overlays/'
      destination:
        server: ''
        namespace: e-commerce
      syncPolicy:
        automated: {}

Conclusion

Deciding between ArgoCD Applications and ApplicationSet really depends on your needs and deployment scenarios. If you’re looking for unique apps that need custom configurations, ArgoCD Applications could be your best bet. However, if you use several similar apps and want to keep things consistent, ApplicationSet can streamline the process.

Check out both options to see what works best for your deployment strategy. And remember, picking the right one can majorly boost your workflow efficiency and app management.

comments powered byDisqus

Copyright © Armand