Skip to content

Instantly share code, notes, and snippets.

@dyasny
Created January 26, 2022 16:15
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dyasny/934e700780a4268794d7b83e1ab8d3fc to your computer and use it in GitHub Desktop.
Save dyasny/934e700780a4268794d7b83e1ab8d3fc to your computer and use it in GitHub Desktop.
argocd application set example
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: overlord
namespace: argocd
spec:
generators:
- git:
repoURL: https://github.com/org/repo.git
revision: HEAD
files:
- path: "appset/config/**/config.yaml"
template:
metadata:
name: '{{project_name}}'
annotations:
notifications.argoproj.io/subscribe.on-sync-failed.slack: my-alerts
notifications.argoproj.io/subscribe.on-sync-status-unknown.slack: my-alerts
notifications.argoproj.io/subscribe.on-health-degraded.slack: my-alerts
notifications.argoproj.io/subscribe.on-deployed.slack: my-alerts
notifications.argoproj.io/subscribe.on-created.slack: my-alerts
notifications.argoproj.io/subscribe.on-deleted.slack: my-alerts
spec:
project: default
syncPolicy:
automated:
prune: '{{prune}}'
selfHeal: '{{self_heal}}'
allowEmpty: '{{allow_empty}}'
syncOptions: # Sync options which modifies sync behavior
- Validate=true
- CreateNamespace=true
- PrunePropagationPolicy=foreground
- PruneLast=true
retry:
limit: 5
backoff:
duration: 10s
factor: 2
maxDuration: 15m
source:
chart: my-helm
path: ''
repoURL: >-
https://raw.githubusercontent.com/org/helmrepo/main/helm-repo/
targetRevision: 0.0.3
helm:
releaseName: my-helm-chart
parameters:
- name: org_id
value: '{{org_id}}'
- name: project_name
value: '{{project_name}}'
- name: replicas
value: '{{replicas}}'
- name: datapath
value: '{{datapath}}'
destination:
server: https://kubernetes.default.svc
#server: '{{cluster.address}}'
namespace: '{{org_id}}'
prune: true
self_heal: true
allow_empty: false
org_id: myorg
project_name: superproject
replicas: 1
datapath: /var/data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment