github.com/argoproj/argo-cd/v3@v3.2.1/docs/user-guide/commands/argocd_app_add-source.md (about) 1 # `argocd app add-source` Command Reference 2 3 ## argocd app add-source 4 5 Adds a source to the list of sources in the application 6 7 ``` 8 argocd app add-source APPNAME [flags] 9 ``` 10 11 ### Examples 12 13 ``` 14 # Append a source to the list of sources in the application 15 argocd app add-source guestbook --repo https://github.com/argoproj/argocd-example-apps.git --path guestbook --source-name guestbook 16 ``` 17 18 ### Options 19 20 ``` 21 --allow-empty Set allow zero live resources when sync is automated 22 -N, --app-namespace string Namespace of the target application where the source will be appended 23 --auto-prune Set automatic pruning when sync is automated 24 --config-management-plugin string Config management plugin name 25 --dest-name string K8s cluster Name (e.g. minikube) 26 --dest-namespace string K8s target namespace 27 --dest-server string K8s cluster URL (e.g. https://kubernetes.default.svc) 28 --directory-exclude string Set glob expression used to exclude files from application source path 29 --directory-include string Set glob expression used to include files from application source path 30 --directory-recurse Recurse directory 31 --dry-source-path string Path in repository to the app directory for the dry source 32 --dry-source-repo string Repository URL of the app dry source 33 --dry-source-revision string Revision of the app dry source 34 --env string Application environment to monitor 35 --helm-api-versions stringArray Helm api-versions (in format [group/]version/kind) to use when running helm template (Can be repeated to set several values: --helm-api-versions traefik.io/v1alpha1/TLSOption --helm-api-versions v1/Service). If not set, use the api-versions from the destination cluster 36 --helm-chart string Helm Chart name 37 --helm-kube-version string Helm kube-version to use when running helm template. If not set, use the kube version from the destination cluster 38 --helm-namespace string Helm namespace to use when running helm template. If not set, use app.spec.destination.namespace 39 --helm-pass-credentials Pass credentials to all domain 40 --helm-set stringArray Helm set values on the command line (can be repeated to set several values: --helm-set key1=val1 --helm-set key2=val2) 41 --helm-set-file stringArray Helm set values from respective files specified via the command line (can be repeated to set several values: --helm-set-file key1=path1 --helm-set-file key2=path2) 42 --helm-set-string stringArray Helm set STRING values on the command line (can be repeated to set several values: --helm-set-string key1=val1 --helm-set-string key2=val2) 43 --helm-skip-crds Skip helm crd installation step 44 --helm-skip-schema-validation Skip helm schema validation step 45 --helm-skip-tests Skip helm test manifests installation step 46 --helm-version string Helm version 47 -h, --help help for add-source 48 --hydrate-to-branch string The branch to hydrate the app to 49 --ignore-missing-components Ignore locally missing component directories when setting Kustomize components 50 --ignore-missing-value-files Ignore locally missing valueFiles when setting helm template --values 51 --jsonnet-ext-var-code stringArray Jsonnet ext var 52 --jsonnet-ext-var-str stringArray Jsonnet string ext var 53 --jsonnet-libs stringArray Additional jsonnet libs (prefixed by repoRoot) 54 --jsonnet-tla-code stringArray Jsonnet top level code arguments 55 --jsonnet-tla-str stringArray Jsonnet top level string arguments 56 --kustomize-api-versions stringArray api-versions (in format [group/]version/kind) to use when running helm template (Can be repeated to set several values: --helm-api-versions traefik.io/v1alpha1/TLSOption --helm-api-versions v1/Service). If not set, use the api-versions from the destination cluster. Only applicable when Helm is enabled for Kustomize builds 57 --kustomize-common-annotation stringArray Set common labels in Kustomize 58 --kustomize-common-label stringArray Set common labels in Kustomize 59 --kustomize-force-common-annotation Force common annotations in Kustomize 60 --kustomize-force-common-label Force common labels in Kustomize 61 --kustomize-image stringArray Kustomize images (e.g. --kustomize-image node:8.15.0 --kustomize-image mysql=mariadb,alpine@sha256:24a0c4b4a4c0eb97a1aabb8e29f18e917d05abfe1b7a7c07857230879ce7d3d) 62 --kustomize-kube-version string kube-version to use when running helm template. If not set, use the kube version from the destination cluster. Only applicable when Helm is enabled for Kustomize builds 63 --kustomize-label-include-templates Apply common label to resource templates 64 --kustomize-label-without-selector Do not apply common label to selectors. Also do not apply label to templates unless --kustomize-label-include-templates is set 65 --kustomize-namespace string Kustomize namespace 66 --kustomize-replica stringArray Kustomize replicas (e.g. --kustomize-replica my-development=2 --kustomize-replica my-statefulset=4) 67 --kustomize-version string Kustomize version 68 --nameprefix string Kustomize nameprefix 69 --namesuffix string Kustomize namesuffix 70 -p, --parameter stringArray set a parameter override (e.g. -p guestbook=image=example/guestbook:latest) 71 --path string Path in repository to the app directory, ignored if a file is set 72 --plugin-env stringArray Additional plugin envs 73 --project string Application project name 74 --ref string Ref is reference to another source within sources field 75 --release-name string Helm release-name 76 --repo string Repository URL, ignored if a file is set 77 --revision string The tracking source branch, tag, commit or Helm chart version the application will sync to 78 --revision-history-limit int How many items to keep in revision history (default 10) 79 --self-heal Set self healing when sync is automated 80 --source-name string Name of the source from the list of sources of the app. 81 --sync-option Prune=false Add or remove a sync option, e.g add Prune=false. Remove using `!` prefix, e.g. `!Prune=false` 82 --sync-policy string Set the sync policy (one of: manual (aliases of manual: none), automated (aliases of automated: auto, automatic)) 83 --sync-retry-backoff-duration duration Sync retry backoff base duration. Input needs to be a duration (e.g. 2m, 1h) (default 5s) 84 --sync-retry-backoff-factor int Factor multiplies the base duration after each failed sync retry (default 2) 85 --sync-retry-backoff-max-duration duration Max sync retry backoff duration. Input needs to be a duration (e.g. 2m, 1h) (default 3m0s) 86 --sync-retry-limit int Max number of allowed sync retries 87 --sync-retry-refresh Indicates if the latest revision should be used on retry instead of the initial one 88 --sync-source-branch string The branch from which the app will sync 89 --sync-source-path string The path in the repository from which the app will sync 90 --validate Validation of repo and cluster (default true) 91 --values stringArray Helm values file(s) to use 92 --values-literal-file string Filename or URL to import as a literal Helm values block 93 ``` 94 95 ### Options inherited from parent commands 96 97 ``` 98 --argocd-context string The name of the Argo-CD server context to use 99 --auth-token string Authentication token; set this or the ARGOCD_AUTH_TOKEN environment variable 100 --client-crt string Client certificate file 101 --client-crt-key string Client certificate key file 102 --config string Path to Argo CD config (default "/home/user/.config/argocd/config") 103 --controller-name string Name of the Argo CD Application controller; set this or the ARGOCD_APPLICATION_CONTROLLER_NAME environment variable when the controller's name label differs from the default, for example when installing via the Helm chart (default "argocd-application-controller") 104 --core If set to true then CLI talks directly to Kubernetes instead of talking to Argo CD API server 105 --grpc-web Enables gRPC-web protocol. Useful if Argo CD server is behind proxy which does not support HTTP2. 106 --grpc-web-root-path string Enables gRPC-web protocol. Useful if Argo CD server is behind proxy which does not support HTTP2. Set web root. 107 -H, --header strings Sets additional header to all requests made by Argo CD CLI. (Can be repeated multiple times to add multiple headers, also supports comma separated headers) 108 --http-retry-max int Maximum number of retries to establish http connection to Argo CD server 109 --insecure Skip server certificate and domain verification 110 --kube-context string Directs the command to the given kube-context 111 --logformat string Set the logging format. One of: json|text (default "json") 112 --loglevel string Set the logging level. One of: debug|info|warn|error (default "info") 113 --plaintext Disable TLS 114 --port-forward Connect to a random argocd-server port using port forwarding 115 --port-forward-namespace string Namespace name which should be used for port forwarding 116 --prompts-enabled Force optional interactive prompts to be enabled or disabled, overriding local configuration. If not specified, the local configuration value will be used, which is false by default. 117 --redis-compress string Enable this if the application controller is configured with redis compression enabled. (possible values: gzip, none) (default "gzip") 118 --redis-haproxy-name string Name of the Redis HA Proxy; set this or the ARGOCD_REDIS_HAPROXY_NAME environment variable when the HA Proxy's name label differs from the default, for example when installing via the Helm chart (default "argocd-redis-ha-haproxy") 119 --redis-name string Name of the Redis deployment; set this or the ARGOCD_REDIS_NAME environment variable when the Redis's name label differs from the default, for example when installing via the Helm chart (default "argocd-redis") 120 --repo-server-name string Name of the Argo CD Repo server; set this or the ARGOCD_REPO_SERVER_NAME environment variable when the server's name label differs from the default, for example when installing via the Helm chart (default "argocd-repo-server") 121 --server string Argo CD server address 122 --server-crt string Server certificate file 123 --server-name string Name of the Argo CD API server; set this or the ARGOCD_SERVER_NAME environment variable when the server's name label differs from the default, for example when installing via the Helm chart (default "argocd-server") 124 ``` 125 126 ### SEE ALSO 127 128 * [argocd app](argocd_app.md) - Manage applications 129