argo-cd
234 строки · 10.3 Кб
1apiVersion: argoproj.io/v1alpha12kind: Application3metadata:4name: guestbook5# You'll usually want to add your resources to the argocd namespace.6namespace: argocd7# Add this finalizer ONLY if you want these to cascade delete.8finalizers:9# The default behaviour is foreground cascading deletion10- resources-finalizer.argocd.argoproj.io11# Alternatively, you can use background cascading deletion12# - resources-finalizer.argocd.argoproj.io/background13# Add labels to your application object.14labels:15name: guestbook16spec:17# The project the application belongs to.18project: default19
20# Source of the application manifests21source:22repoURL: https://github.com/argoproj/argocd-example-apps.git # Can point to either a Helm chart repo or a git repo.23targetRevision: HEAD # For Helm, this refers to the chart version.24path: guestbook # This has no meaning for Helm charts pulled directly from a Helm repo instead of git.25
26# helm specific config27chart: chart-name # Set this when pulling directly from a Helm repo. DO NOT set for git-hosted Helm charts.28helm:29passCredentials: false # If true then adds --pass-credentials to Helm commands to pass credentials to all domains30# Extra parameters to set (same as setting through values.yaml, but these take precedence)31parameters:32- name: "nginx-ingress.controller.service.annotations.external-dns\\.alpha\\.kubernetes\\.io/hostname"33value: mydomain.example.com34- name: "ingress.annotations.kubernetes\\.io/tls-acme"35value: "true"36forceString: true # ensures that value is treated as a string37
38# Use the contents of files as parameters (uses Helm's --set-file)39fileParameters:40- name: config41path: files/config.json42
43# Release name override (defaults to application name)44releaseName: guestbook45
46# Helm values files for overriding values in the helm chart47# The path is relative to the spec.source.path directory defined above48valueFiles:49- values-prod.yaml50
51# Ignore locally missing valueFiles when installing Helm chart. Defaults to false52ignoreMissingValueFiles: false53
54# Values file as block file. Prefer to use valuesObject if possible (see below)55values: |56ingress:
57enabled: true
58path: /
59hosts:
60- mydomain.example.com
61annotations:
62kubernetes.io/ingress.class: nginx
63kubernetes.io/tls-acme: "true"
64labels: {}
65tls:
66- secretName: mydomain-tls
67hosts:
68- mydomain.example.com
69
70# Values file as block file. This takes precedence over values71valuesObject:72ingress:73enabled: true74path: /75hosts:76- mydomain.example.com77annotations:78kubernetes.io/ingress.class: nginx79kubernetes.io/tls-acme: "true"80labels: {}81tls:82- secretName: mydomain-tls83hosts:84- mydomain.example.com85
86# Skip custom resource definition installation if chart contains custom resource definitions. Defaults to false87skipCrds: false88
89# Optional Helm version to template with. If omitted it will fall back to look at the 'apiVersion' in Chart.yaml90# and decide which Helm binary to use automatically. This field can be either 'v2' or 'v3'.91version: v292
93# kustomize specific config94kustomize:95# Optional kustomize version. Note: version must be configured in argocd-cm ConfigMap96version: v3.5.497# Supported kustomize transformers. https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/98namePrefix: prod-99nameSuffix: -some-suffix100commonLabels:101foo: bar102commonAnnotations:103beep: boop-${ARGOCD_APP_REVISION}104# Toggle which enables/disables env variables substitution in commonAnnotations105commonAnnotationsEnvsubst: true106images:107- gcr.io/heptio-images/ks-guestbook-demo:0.2108- my-app=gcr.io/my-repo/my-app:0.1109namespace: custom-namespace110replicas:111- name: kustomize-guestbook-ui112count: 4113
114# directory115directory:116recurse: true117jsonnet:118# A list of Jsonnet External Variables119extVars:120- name: foo121value: bar122# You can use "code" to determine if the value is either string (false, the default) or Jsonnet code (if code is true).123- code: true124name: baz125value: "true"126# A list of Jsonnet Top-level Arguments127tlas:128- code: false129name: foo130value: bar131# Exclude contains a glob pattern to match paths against that should be explicitly excluded from being used during132# manifest generation. This takes precedence over the `include` field.133# To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'134exclude: 'config.yaml'135# Include contains a glob pattern to match paths against that should be explicitly included during manifest136# generation. If this field is set, only matching manifests will be included.137# To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'138include: '*.yaml'139
140# plugin specific config141plugin:142# If the plugin is defined as a sidecar and name is not passed, the plugin will be automatically matched with the143# Application according to the plugin's discovery rules.144name: mypluginname145# environment variables passed to the plugin146env:147- name: FOO148value: bar149# Plugin parameters are new in v2.5.150parameters:151- name: string-param152string: example-string153- name: array-param154array: [item1, item2]155- name: map-param156map:157param-name: param-value158
159# Sources field specifies the list of sources for the application160sources:161- repoURL: https://github.com/argoproj/argocd-example-apps.git # Can point to either a Helm chart repo or a git repo.162targetRevision: HEAD # For Helm, this refers to the chart version.163path: guestbook # This has no meaning for Helm charts pulled directly from a Helm repo instead of git.164ref: my-repo # For Helm, acts as a reference to this source for fetching values files from this source. Has no meaning when under `source` field165
166# Destination cluster and namespace to deploy the application167destination:168# cluster API URL169server: https://kubernetes.default.svc170# or cluster name171# name: in-cluster172# The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace173namespace: guestbook174
175# Extra information to show in the Argo CD Application details tab176info:177- name: 'Example:'178value: 'https://example.com'179
180# Sync policy181syncPolicy:182automated: # automated sync by default retries failed attempts 5 times with following delays between attempts ( 5s, 10s, 20s, 40s, 80s ); retry controlled using `retry` field.183prune: true # Specifies if resources should be pruned during auto-syncing ( false by default ).184selfHeal: 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 ).185allowEmpty: false # Allows deleting all application resources during automatic syncing ( false by default ).186syncOptions: # Sync options which modifies sync behavior187- Validate=false # disables resource validation (equivalent to 'kubectl apply --validate=false') ( true by default ).188- CreateNamespace=true # Namespace Auto-Creation ensures that namespace specified as the application destination exists in the destination cluster.189- PrunePropagationPolicy=foreground # Supported policies are background, foreground and orphan.190- PruneLast=true # Allow the ability for resource pruning to happen as a final, implicit wave of a sync operation191- RespectIgnoreDifferences=true # When syncing changes, respect fields ignored by the ignoreDifferences configuration192- ApplyOutOfSyncOnly=true # Only sync out-of-sync resources, rather than applying every object in the application193managedNamespaceMetadata: # Sets the metadata for the application namespace. Only valid if CreateNamespace=true (see above), otherwise it's a no-op.194labels: # The labels to set on the application namespace195any: label196you: like197annotations: # The annotations to set on the application namespace198the: same199applies: for200annotations: on-the-namespace201
202# The retry feature is available since v1.7203retry:204limit: 5 # number of failed sync attempt retries; unlimited number of attempts if less than 0205backoff:206duration: 5s # the amount to back off. Default unit is seconds, but could also be a duration (e.g. "2m", "1h")207factor: 2 # a factor to multiply the base duration after each failed retry208maxDuration: 3m # the maximum amount of time allowed for the backoff strategy209
210# Will ignore differences between live and desired states during the diff. Note that these configurations are not211# used during the sync process unless the `RespectIgnoreDifferences=true` sync option is enabled.212ignoreDifferences:213# for the specified json pointers214- group: apps215kind: Deployment216jsonPointers:217- /spec/replicas218- kind: ConfigMap219jqPathExpressions:220- '.data["config.yaml"].auth'221# for the specified managedFields managers222- group: "*"223kind: "*"224managedFieldsManagers:225- kube-controller-manager226# Name and namespace are optional. If specified, they must match exactly, these are not glob patterns.227name: my-deployment228namespace: my-namespace229
230# RevisionHistoryLimit limits the number of items kept in the application's revision history, which is used for231# informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional232# circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the233# space used to store the history, so we do not recommend increasing it.234revisionHistoryLimit: 10235