1 of 20

GitOps on scale

with ArgoCD

Denys Zhyhulin | DevOps Engineer

dzhyhulin@bostonsd.com

https://www.linkedin.com/in/deniszn

2 of 20

Table of Contents

  • GitOps
    • Overview
    • The GitOps Terms
    • The GitOps Principles
    • An Example GitOps Workflow
    • Existing GitOps Controllers
  • ArgoCD
    • Overview
    • The “App of Apps” Pattern
    • The “Application Set” Pattern
  • Demo
    • Demo Environment

3 of 20

GitOps Overview

4 of 20

Observable

Standard enforcer

Relatively young

DevOps native

Scalable

We love GitOps because it’s…

Git-centric

Universal

Rollback-capable

5 of 20

The GitOps terms

  • System
  • Desired State
  • Declarative Description
  • (Configuration) Drift
  • Reconciliation
  • GitOps Controller

6 of 20

The GitOps Principles

  • Declarative
  • Versioned and Immutable
  • Pulled Automatically
  • Continuously Reconciled

7 of 20

An Example GitOps Workflow

8 of 20

Existing GitOps Controllers

  • ArgoCD
  • FluxCD
  • Weave GitOps
  • Jenkins X
  • Flamingo
  • Werf

9 of 20

ArgoCD Overview

10 of 20

We should evaluate ArgoCD because it’s…

Observable

Kubernetes native

Minimalistic

Configurable

Fully declarative

Scalable

Both CD and CD capable

A part of an ecosystem

11 of 20

The ”App of Apps” Pattern

Apps of Apps (one per cluster). Usually gets synced by one more app.

Base applications to be deployed.

Cluster-specific overlays, i.e., ‘.spec.destination.name’.

12 of 20

The ”App of Apps” Pattern

Base Application

Cluster-level global overlay

.spec.destination.name is a placeholder

that MUST be overridden by a cluster-specific overlay

.spec.source.targetRevision can be overridden on demand

Cluster-level application overlay

Overrides .spec.destination.name

Overrides .spec.source.targetRevision

13 of 20

The ”App of Apps” Pattern

Pros:

  • Easy to implement and operate
  • Overall customizability
  • Easy to validate and troubleshoot
  • Stability

Cons:

  • Scaling Complexity
  • Dependency management
  • Code duplication

14 of 20

The ”Application Set” Pattern

An Application Set resource. Generates Applications based on Generators’ output.

15 of 20

The ”Application Set” Pattern

ApplicationSet

Enable Go Template for this Application Set

Fetch all clusters matched by matchLabel

Extract the value of the annotation as a variable,

provide a default value if not set

Generate an Application for each element of the resulting list:

- name: demo-worker1

values:

chartVersion: 7.1.256 ( the default value )

- name: demo-worker2

values:

chartVersion: 6.1.47 ( via the annotation )

16 of 20

The ”Application Set” Pattern

Pros:

  • Universal
  • Fail-safe
  • Scalable by design
  • Go-template support

Cons:

  • Troubleshooting complexity
  • Development complexity
  • Refactoring complexity
  • Allows insecure actions

17 of 20

Demo

18 of 20

Demo Environment

Tech Stack:

  • Kubernetes
  • ArgoCD
  • Kustomize
  • Helm
  • Git
  • Ingress Nginx (a demo service)
  • Cert-Manager (a demo service)
  • Reflector (a demo service)
  • Taskfile (Optional)
  • Terraform (Optional)

19 of 20

Links

20 of 20

Boston SoftDesign, Inc.233 Needham Street, Suite 550

Newton Upper Falls, MA 02464-1605

Office: +1 (617) 546-8088

E-mail: info@bostonsd.com

Thank you!