Application
Delivery on K8S
with GitOps
Pham Quang Minh
Viet OpenInfra Meetup #23
January 11, 2020
About me
• Pham Quang Minh
• DevOps Leader at
GAPO
• Interested in:
• Architecture
• Micro-services and
Distributed system
• Data driven culture
Agenda
 GitOps: What / Why?
 Helm manager: FluxCD vs ArgoCD
 Intergrate CI and ArgoCD
 Experience
 Best practices
 Scaling ArgoCD
 Micro-ing the monolith
 FAQ
GitOps CI/CD for K8S
What / Why?
Infrastructure as Code
Old-fashioned pipeline - CIOps
 Deployment script, chart,… in project repo
 Pipeline triggered by any change
 Hard to manage
 Security
Entering GitOps
 Use Git as the Source of Truth
 Manifest
 Configuration
 State
 Declarative specification
 Reliable
 Observable
Entering GitOps
Helm manager:
Weave Flux vs ArgoCD
Continuous Delivery Battle
 GitOps Flow
 Helm manager
 K8S native
 Fast intergration
 Flexible
 Production ready
 Simple “enough”
Weave Flux
ArgoCD
Weave Flux vs ArgoCD
Weave Flux
 Interval
 Repo – based
 Docker registry monitor
 Auto commit state
 Cloud / Third party UI
 One repo, one cluster
ArgoCD
 Interval + webhook
 Application – based
 Git manifest monitor
 Manual commit state
 Built-in UI
 Multiple repo, multiple
cluster
 SSO, RBAC,...
Cool, heh?
And we choose...
CI + ArgoCD
Who is missing?
Helm chart design
Helm chart design
Simple updater
GitlabCI example
Source
 Base webhook
 https://github.com/ncarlier/webhookd
 Full example with script, chart,…
 https://github.com/minhpq331/webh
ookd-argocd
Experience
Best practices
 Health check is VERY important
 Separated code & deployment
config
 1 branch - 1 environment
 Secret management: Vault, Bitnami
Sealed secret,…
 Tag docker image with commit SHA.
Eg: dev-v1-abcdxyz
CI/CD bottle-neck
Scaling ArgoCD
 Many applications may cause
“Unknown state”
 ~10 applications per argocd-repo-
server
Micro-ing the monolith
 Use same chart, same values file
 Clone “Application” manifest with
different name
 Config routing to 2 “Service”
 Happy micro-servicing
What next?
 Meet their children: GitOps Engine
 https://github.com/argoproj/gitops-engine
Questions
Interested? Join us!
Email: hr@gapo.vn
Telegram: minhpq

Meetup 23 - 03 - Application Delivery on K8S with GitOps