github.com/argoproj/argo-cd/v2@v2.10.5/docs/user-guide/commands/argocd_admin_app_generate-spec.md (about) 1 # `argocd admin app generate-spec` Command Reference 2 3 ## argocd admin app generate-spec 4 5 Generate declarative config for an application 6 7 ``` 8 argocd admin app generate-spec APPNAME [flags] 9 ``` 10 11 ### Examples 12 13 ``` 14 15 # Generate declarative config for a directory app 16 argocd admin app generate-spec guestbook --repo https://github.com/argoproj/argocd-example-apps.git --path guestbook --dest-namespace default --dest-server https://kubernetes.default.svc --directory-recurse 17 18 # Generate declarative config for a Jsonnet app 19 argocd admin app generate-spec jsonnet-guestbook --repo https://github.com/argoproj/argocd-example-apps.git --path jsonnet-guestbook --dest-namespace default --dest-server https://kubernetes.default.svc --jsonnet-ext-str replicas=2 20 21 # Generate declarative config for a Helm app 22 argocd admin app generate-spec helm-guestbook --repo https://github.com/argoproj/argocd-example-apps.git --path helm-guestbook --dest-namespace default --dest-server https://kubernetes.default.svc --helm-set replicaCount=2 23 24 # Generate declarative config for a Helm app from a Helm repo 25 argocd admin app generate-spec nginx-ingress --repo https://charts.helm.sh/stable --helm-chart nginx-ingress --revision 1.24.3 --dest-namespace default --dest-server https://kubernetes.default.svc 26 27 # Generate declarative config for a Kustomize app 28 argocd admin app generate-spec kustomize-guestbook --repo https://github.com/argoproj/argocd-example-apps.git --path kustomize-guestbook --dest-namespace default --dest-server https://kubernetes.default.svc --kustomize-image gcr.io/heptio-images/ks-guestbook-demo:0.1 29 30 # Generate declarative config for a app using a custom tool: 31 argocd admin app generate-spec kasane --repo https://github.com/argoproj/argocd-example-apps.git --path plugins/kasane --dest-namespace default --dest-server https://kubernetes.default.svc --config-management-plugin kasane 32 33 ``` 34 35 ### Options 36 37 ``` 38 --allow-empty Set allow zero live resources when sync is automated 39 --annotations stringArray Set metadata annotations (e.g. example=value) 40 --auto-prune Set automatic pruning when sync is automated 41 --config-management-plugin string Config management plugin name 42 --dest-name string K8s cluster Name (e.g. minikube) 43 --dest-namespace string K8s target namespace 44 --dest-server string K8s cluster URL (e.g. https://kubernetes.default.svc) 45 --directory-exclude string Set glob expression used to exclude files from application source path 46 --directory-include string Set glob expression used to include files from application source path 47 --directory-recurse Recurse directory 48 --env string Application environment to monitor 49 -f, --file string Filename or URL to Kubernetes manifests for the app 50 --helm-chart string Helm Chart name 51 --helm-pass-credentials Pass credentials to all domain 52 --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) 53 --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) 54 --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) 55 --helm-skip-crds Skip helm crd installation step 56 --helm-version string Helm version 57 -h, --help help for generate-spec 58 --ignore-missing-value-files Ignore locally missing valueFiles when setting helm template --values 59 -i, --inline If set then generated resource is written back to the file specified in --file flag 60 --jsonnet-ext-var-code stringArray Jsonnet ext var 61 --jsonnet-ext-var-str stringArray Jsonnet string ext var 62 --jsonnet-libs stringArray Additional jsonnet libs (prefixed by repoRoot) 63 --jsonnet-tla-code stringArray Jsonnet top level code arguments 64 --jsonnet-tla-str stringArray Jsonnet top level string arguments 65 --kustomize-common-annotation stringArray Set common labels in Kustomize 66 --kustomize-common-label stringArray Set common labels in Kustomize 67 --kustomize-force-common-annotation Force common annotations in Kustomize 68 --kustomize-force-common-label Force common labels in Kustomize 69 --kustomize-image stringArray Kustomize images (e.g. --kustomize-image node:8.15.0 --kustomize-image mysql=mariadb,alpine@sha256:24a0c4b4a4c0eb97a1aabb8e29f18e917d05abfe1b7a7c07857230879ce7d3d) 70 --kustomize-namespace string Kustomize namespace 71 --kustomize-replica stringArray Kustomize replicas (e.g. --kustomize-replica my-development=2 --kustomize-replica my-statefulset=4) 72 --kustomize-version string Kustomize version 73 -l, --label stringArray Labels to apply to the app 74 --name string A name for the app, ignored if a file is set (DEPRECATED) 75 --nameprefix string Kustomize nameprefix 76 --namesuffix string Kustomize namesuffix 77 -o, --output string Output format. One of: json|yaml (default "yaml") 78 -p, --parameter stringArray set a parameter override (e.g. -p guestbook=image=example/guestbook:latest) 79 --path string Path in repository to the app directory, ignored if a file is set 80 --plugin-env stringArray Additional plugin envs 81 --project string Application project name 82 --release-name string Helm release-name 83 --repo string Repository URL, ignored if a file is set 84 --revision string The tracking source branch, tag, commit or Helm chart version the application will sync to 85 --revision-history-limit int How many items to keep in revision history (default 10) 86 --self-heal Set self healing when sync is automated 87 --sync-option Prune=false Add or remove a sync option, e.g add Prune=false. Remove using `!` prefix, e.g. `!Prune=false` 88 --sync-policy string Set the sync policy (one of: none, automated (aliases of automated: auto, automatic)) 89 --sync-retry-backoff-duration duration Sync retry backoff base duration. Input needs to be a duration (e.g. 2m, 1h) (default 5s) 90 --sync-retry-backoff-factor int Factor multiplies the base duration after each failed sync retry (default 2) 91 --sync-retry-backoff-max-duration duration Max sync retry backoff duration. Input needs to be a duration (e.g. 2m, 1h) (default 3m0s) 92 --sync-retry-limit int Max number of allowed sync retries 93 --validate Validation of repo and cluster (default true) 94 --values stringArray Helm values file(s) to use 95 --values-literal-file string Filename or URL to import as a literal Helm values block 96 ``` 97 98 ### Options inherited from parent commands 99 100 ``` 101 --auth-token string Authentication token 102 --client-crt string Client certificate file 103 --client-crt-key string Client certificate key file 104 --config string Path to Argo CD config (default "/home/user/.config/argocd/config") 105 --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") 106 --core If set to true then CLI talks directly to Kubernetes instead of talking to Argo CD API server 107 --grpc-web Enables gRPC-web protocol. Useful if Argo CD server is behind proxy which does not support HTTP2. 108 --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. 109 -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) 110 --http-retry-max int Maximum number of retries to establish http connection to Argo CD server 111 --insecure Skip server certificate and domain verification 112 --kube-context string Directs the command to the given kube-context 113 --logformat string Set the logging format. One of: text|json (default "text") 114 --loglevel string Set the logging level. One of: debug|info|warn|error (default "info") 115 --plaintext Disable TLS 116 --port-forward Connect to a random argocd-server port using port forwarding 117 --port-forward-namespace string Namespace name which should be used for port forwarding 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 admin app](argocd_admin_app.md) - Manage applications configuration 129