Skip to content

Commit 3d72a77

Browse files
committed
feat: add template files
1 parent 3d36c46 commit 3d72a77

File tree

1 file changed

+139
-0
lines changed

1 file changed

+139
-0
lines changed

sample-files/application.yml

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: Application
3+
metadata:
4+
name: guestbook
5+
# You'll usually want to add your resources to the argocd namespace.
6+
namespace: argocd
7+
# Add this finalizer ONLY if you want these to cascade delete.
8+
finalizers:
9+
- resources-finalizer.argocd.argoproj.io
10+
spec:
11+
# The project the application belongs to.
12+
project: default
13+
14+
# Source of the application manifests
15+
source:
16+
repoURL: https://github.com/argoproj/argocd-example-apps.git # Can point to either a Helm chart repo or a git repo.
17+
targetRevision: HEAD # For Helm, this refers to the chart version.
18+
path: guestbook # This has no meaning for Helm charts pulled directly from a Helm repo instead of git.
19+
20+
# helm specific config
21+
chart: chart-name # Set this when pulling directly from a Helm repo. DO NOT set for git-hosted Helm charts.
22+
helm:
23+
# Extra parameters to set (same as setting through values.yaml, but these take precedence)
24+
parameters:
25+
- name: "nginx-ingress.controller.service.annotations.external-dns\\.alpha\\.kubernetes\\.io/hostname"
26+
value: mydomain.example.com
27+
- name: "ingress.annotations.kubernetes\\.io/tls-acme"
28+
value: "true"
29+
forceString: true # ensures that value is treated as a string
30+
31+
# Use the contents of files as parameters (uses Helm's --set-file)
32+
fileParameters:
33+
- name: config
34+
path: files/config.json
35+
36+
# Release name override (defaults to application name)
37+
releaseName: guestbook
38+
39+
# Helm values files for overriding values in the helm chart
40+
# The path is relative to the spec.source.path directory defined above
41+
valueFiles:
42+
- values-prod.yaml
43+
44+
# Values file as block file
45+
values: |
46+
ingress:
47+
enabled: true
48+
path: /
49+
hosts:
50+
- mydomain.example.com
51+
annotations:
52+
kubernetes.io/ingress.class: nginx
53+
kubernetes.io/tls-acme: "true"
54+
labels: {}
55+
tls:
56+
- secretName: mydomain-tls
57+
hosts:
58+
- mydomain.example.com
59+
60+
# Optional Helm version to template with. If omitted it will fall back to look at the 'apiVersion' in Chart.yaml
61+
# and decide which Helm binary to use automatically. This field can be either 'v2' or 'v3'.
62+
version: v2
63+
64+
# kustomize specific config
65+
kustomize:
66+
# Optional kustomize version. Note: version must be configured in argocd-cm ConfigMap
67+
version: v3.5.4
68+
# Optional image name prefix
69+
namePrefix: prod-
70+
# Optional images passed to "kustomize edit set image".
71+
images:
72+
- gcr.io/heptio-images/ks-guestbook-demo:0.2
73+
74+
# directory
75+
directory:
76+
recurse: true
77+
jsonnet:
78+
# A list of Jsonnet External Variables
79+
extVars:
80+
- name: foo
81+
value: bar
82+
# You can use "code to determine if the value is either string (false, the default) or Jsonnet code (if code is true).
83+
- code: true
84+
name: baz
85+
value: "true"
86+
# A list of Jsonnet Top-level Arguments
87+
tlas:
88+
- code: false
89+
name: foo
90+
value: bar
91+
92+
# plugin specific config
93+
plugin:
94+
# Only set the plugin name if the plugin is defined in argocd-cm.
95+
# If the plugin is defined as a sidecar, omit the name. The plugin will be automatically matched with the
96+
# Application according to the plugin's discovery rules.
97+
name: mypluginname
98+
# environment variables passed to the plugin
99+
env:
100+
- name: FOO
101+
value: bar
102+
103+
# Destination cluster and namespace to deploy the application
104+
destination:
105+
server: https://kubernetes.default.svc
106+
namespace: guestbook
107+
108+
# Sync policy
109+
syncPolicy:
110+
automated: # automated sync by default retries failed attempts 5 times with following delays between attempts ( 5s, 10s, 20s, 40s, 80s ); retry controlled using `retry` field.
111+
prune: true # Specifies if resources should be pruned during auto-syncing ( false by default ).
112+
selfHeal: true # Specifies if partial app sync should be executed when resources are changed only in target Kubernetes cluster and no git change detected ( false by default ).
113+
allowEmpty: false # Allows deleting all application resources during automatic syncing ( false by default ).
114+
syncOptions: # Sync options which modifies sync behavior
115+
- Validate=false # disables resource validation (equivalent to 'kubectl apply --validate=false') ( true by default ).
116+
- CreateNamespace=true # Namespace Auto-Creation ensures that namespace specified as the application destination exists in the destination cluster.
117+
- PrunePropagationPolicy=foreground # Supported policies are background, foreground and orphan.
118+
- PruneLast=true # Allow the ability for resource pruning to happen as a final, implicit wave of a sync operation
119+
# The retry feature is available since v1.7
120+
retry:
121+
limit: 5 # number of failed sync attempt retries; unlimited number of attempts if less than 0
122+
backoff:
123+
duration: 5s # the amount to back off. Default unit is seconds, but could also be a duration (e.g. "2m", "1h")
124+
factor: 2 # a factor to multiply the base duration after each failed retry
125+
maxDuration: 3m # the maximum amount of time allowed for the backoff strategy
126+
127+
# Will ignore differences between live and desired states during the diff. Note that these configurations are not
128+
# used during the sync process.
129+
ignoreDifferences:
130+
# for the specified json pointers
131+
- group: apps
132+
kind: Deployment
133+
jsonPointers:
134+
- /spec/replicas
135+
# for the specified managedFields managers
136+
- group: "*"
137+
kind: "*"
138+
managedFieldsManagers:
139+
- kube-controller-manager

0 commit comments

Comments
 (0)