apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: backend-dev
namespace: default
annotations:
argocd-image-updater.argoproj.io/image-list: backend-dev=XXX.dkr.ecr.ap-northeast-2.amazonaws.com/backend:dev
argocd-image-updater.argoproj.io/backend-dev.update-strategy: digest
argocd-image-updater.argoproj.io/backend-dev.pull-secret: ext:/app/config/ecr.sh
spec:
project: devops
destination:
name: dev-cluster
namespace: default
source:
path: application/projectName/backend/overlays/dev
repoURL: git@github.com:TEAM/k8s-manifest.git
targetRevision: dev
syncPolicy:
syncOptions: # Sync options which modifies sync behavior
- Validate=false # disables resource validation (equivalent to 'kubectl apply --validate=false') ( true by default ).
- CreateNamespace=true # Namespace Auto-Creation ensures that namespace specified as the application destination exists in the destination cluster.
- PrunePropagationPolicy=foreground # Supported policies are background, foreground and orphan.
- PruneLast=true # Allow the ability for resource pruning to happen as a final, implicit wave of a sync operation
- ApplyOutOfSyncOnly=true
- RespectIgnoreDifferences=true
- Replace=true
# The retry feature is available since v1.7
retry:
limit: 1 # number of failed sync attempt retries; unlimited number of attempts if less than 0
backoff:
duration: 5s # the amount to back off. Default unit is seconds, but could also be a duration (e.g. "2m", "1h")
factor: 2 # a factor to multiply the base duration after each failed retry
maxDuration: 3m # the maximum amount of time allowed for the backoff strategy
applications
projectName
backend
base
deployment.yaml
service.yaml
kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- deployment.yaml
- service.yaml
overlays
dev
kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../base
namespace: dev
images:
- name: XXX.dkr.ecr.ap-northeast-2.amazonaws.com/backend
newTag: 0.0.2
staging
prod