How do I do progressive delivery for Persistent Volumes with Argo CD?

Learn how to implement progressive delivery for Persistent Volumes using Argo CD, a continuous delivery tool for Kubernetes, to manage your application's lifecycle effectively.

progressive delivery, Persistent Volumes, Argo CD, Kubernetes, continuous delivery, deployment strategies, DevOps


apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-app
spec:
  replicas: 3
  selector:
    matchLabels:
      app: my-app
  template:
    metadata:
      labels:
        app: my-app
    spec:
      containers:
      - name: my-app-container
        image: my-app:latest
        volumeMounts:
        - name: my-persistent-volume
          mountPath: /data
      volumes:
      - name: my-persistent-volume
        persistentVolumeClaim:
          claimName: my-pvc

---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: my-pvc
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 10Gi

---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: my-app
spec:
  project: default
  source:
    repoURL: 'https://github.com/my-repo/my-app.git'
    targetRevision: HEAD
    path: manifests
  destination:
    server: 'https://kubernetes.default.svc'
    namespace: default
  syncPolicy:
    automated:
      prune: true
      selfHeal: true
    syncOptions:
      - Validate=true
      - ApplyOutOfSyncOnly=true
  # Specify the progressive delivery strategy
  progressiveDelivery:
    keys:
      - environment: staging
      - environment: production
  

progressive delivery Persistent Volumes Argo CD Kubernetes continuous delivery deployment strategies DevOps