ArgoCD GitOps
Deploy Laminar using GitOps with ArgoCD.
Prerequisites
- EKS cluster running (see EKS deployment)
- ArgoCD installed in
argonamespace - kubectl configured
Quick Start
cd laminar-infra
# Apply ArgoCD project and applications
task argocd:apply
# List applications
task argocd:list
# Sync all
task argocd:sync-allArchitecture
ArgoCD uses an app-of-apps pattern:
laminar (AppProject)
āāā laminar-tenants-app-of-app (parent)
ā āāā tenant-e6data
ā āāā tenant-highradius
āāā laminar-product
āāā laminar-monitoring
āāā laminar-connectors
Applications
| Application | Namespace | Chart |
|---|---|---|
| tenant-e6data | tenant-e6data | laminar-core |
| tenant-highradius | tenant-highradius | laminar-core |
| laminar-product | laminar-product | laminar-product |
| laminar-monitoring | laminar-monitoring | laminar-monitoring |
| laminar-connectors | laminar-connectors | laminar-connectors |
Commands
task argocd:apply # Apply all resources
task argocd:list # List applications
task argocd:sync APP=<name> # Sync specific app
task argocd:sync-all # Sync all apps
task argocd:delete APP=<name> # Delete appStructure
argocd/
āāā Taskfile.yml
āāā projects/
ā āāā laminar.yaml # AppProject definition
āāā applications/
āāā laminar-tenants-app-of-app.yaml
āāā laminar-product.yaml
āāā laminar-monitoring.yaml
āāā laminar-connectors.yaml
āāā tenants/
āāā e6data.yaml
āāā highradius.yaml
Add New Tenant
- Create Helm values:
mkdir -p k8s/laminar-core/tenants/newtenant
cp k8s/laminar-core/tenants/e6data/values-eks.yaml k8s/laminar-core/tenants/newtenant/
# Edit values as needed- Create ArgoCD application:
# argocd/applications/tenants/newtenant.yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: tenant-newtenant
namespace: argo
spec:
project: laminar
source:
repoURL: git@github.com:e6data/laminar-infra.git
targetRevision: main
path: k8s/laminar-core
helm:
valueFiles:
- values-eks.yaml
- tenants/newtenant/values-eks.yaml
destination:
server: https://kubernetes.default.svc
namespace: tenant-newtenant
syncPolicy:
automated:
prune: true
syncOptions:
- CreateNamespace=true- Apply:
task argocd:applyAppProject Config
The laminar project allows deployments to:
tenant-*namespaceslaminar-*namespacesargonamespace
Source: git@github.com:e6data/laminar-infra.git
CI/CD Integration
ArgoCD works with Argo Workflows for a complete CI/CD pipeline. See CI/CD for details.
Workflow
- Build: Argo Workflows builds and pushes images to ECR
- Update: Commit new image tag to
values-eks.yaml - Sync: ArgoCD detects the change and deploys automatically
Updating Image Tags
After a successful build, update the deployment:
Option 1: Git Commit (Recommended)
# Edit values file
vim k8s/laminar-product/values-eks.yaml
# Update image.tag for console/product
# Commit and push
git add . && git commit -m "Update image tags" && git push
# ArgoCD syncs automaticallyOption 2: ArgoCD Override
# Override without git commit
argocd app set laminar-product \
--helm-set console.image.tag=a1b2c3d
argocd app sync laminar-productSync Policies
All applications use automated sync with:
- Prune: Removes resources deleted from git
- Self-heal: Reverts manual cluster changes
- CreateNamespace: Auto-creates target namespace
Access ArgoCD UI
# KIND/Local
kubectl port-forward svc/argocd-server -n argo 8080:443
# Open https://localhost:8080
# EKS
# Navigate to https://cd.lmnr.cloudGet the admin password:
kubectl -n argo get secret argocd-initial-admin-secret \
-o jsonpath="{.data.password}" | base64 -d