Upgrade to Pro — share decks privately, control downloads, hide ads and more …

GitOps with Argo CD & Helm: Managing Your Kuber...

GitOps with Argo CD & Helm: Managing Your Kubernetes Repository

Title: GitOps with Argo CD & Helm:
Managing Your Kubernetes Repository
Presented during Kubernetes Community Days - March 2023 Israel

lior yantovski

May 08, 2023
Tweet

Other Decks in Technology

Transcript

  1. GitOps with Argo CD & Helm: Managing Your Kubernetes Repository

    Lior Yantovski | Chen Fliesher AT&T Israel DevOps March 2023 © 2023 AT&T Intellectual Property. AT&T and globe logo are registered trademarks and service marks of AT&T Intellectual Property and/or AT&T affiliated companies. All other marks are the property of their respective owners.
  2. Chen Fliesher Lior Yantovski [email protected] [email protected] About Us DevOps Tech-Lead

    Happily Married + 3 Girls 10 years at AT&T Azure, Kubernetes, CI/CD, Observability, Cloud-Native and more < > < > > < > <
  3. 4 • What is GitOps? • How Does Argo CD

    implement GitOps? • Argo CD , Git & Helm • Managing configuration at scale • Repository structure options • Configuration flow • Demo Our Agenda
  4. 6 GitOps is a practice that combines developer workflows, implements

    source code repository as source of truth & enables continuous deployments GitOps main principles: 1. Declarative 2. Versioned and Immutable 3. Pulled Automatically 4. Continuously Reconciled https://opengitops.dev/ What is GitOps?
  5. 8 What is GitOps? Benefits of Using GitOps  Developer

    best practices: code reviews, pull requests, history tracking  Can be implemented on IaC (Infrastructure as a Code) and Apps  Faster deployments and rollbacks by fast Observability feedback  Increased stability and reliability - No configuration drifts!
  6. 9 What is GitOps? Challenges of Using GitOps  New

    process, new methodology, new mindset  Find the significant commit  Centralized secret management  Find the right Git repos structure
  7. Argo CD 13 Let’s define “CD” in Argo Application Source

    Destination + NS Sync Policy Project Chart/Container
  8. 14 apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: kcd-api-app namespace: argocd

    spec: project: kcd sources: - repoURL: 'https://my-git-repo.com/kcd-api' targetRevision: main ref: kcd-api - repoURL: 'my-container.registry.io/charts' targetRevision: 0.0.2 chart: 'kcd-api-chart' helm: valueFiles: - $kcd-api/values.yaml destination: server: 'https://my-kubernetes-cluster.default.svc' namespace: kcd-dev-apps syncPolicy: automated: prune: true syncOptions: - CreateNamespace=true
  9. How to arrange your Git repository? 17 1. Use one

    single Git branch Don’t use long term branches per Environment – anti pattern! Do use short-lived branches to allow Pull Request reviews with required reviewers 2. Single source of truth doesn’t mean one Git repo! • “All in one” - Single Repository for All – separation using Directories • “Fan Out” - Repository per Environment - separation using Repositories Argo CD & Git
  10. Helm is More Than just a Template 19  Helm

    allows validation of CRs/CRDs YAML prior to applying  Helm supports various methods of distribution  Helm allows dependency modules (just like code)  Use Helm Charts for templatization to keep your code DRY and avoid repeated YAMLs Argo CD, Git & Helm
  11. 25

  12. 26 Environment Self-Contained Keep your Code DRY Manage Applications at

    Scale Fan Out Repository Structure Summary Choose your own Argo way