1. Install argoCD
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
2. Git repo structure
ml-infra-gitops/
gpu-jobs/
job1/
values.yaml
helm-chart/
job2/
base-infra/
jupyterhub/
tf-serving/
3. Create Argo CD Applications
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: gpu-job1
spec:
project: default
source:
repoURL: 'https://github.com/my-org/ml-infra-gitops'
targetRevision: HEAD
path: gpu-jobs/job1
helm:
valueFiles:
- values.yaml
destination:
server: 'https://kubernetes.default.svc'
namespace: gpu-jobs
syncPolicy:
automated:
prune: true
selfHeal: true
4. Deploy
kubectl apply -f gpu-job1-application.yaml