Created
January 26, 2022 16:15
-
-
Save dyasny/934e700780a4268794d7b83e1ab8d3fc to your computer and use it in GitHub Desktop.
argocd application set example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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