Files
argo-cd/docs/user-guide/jsonnet.md
Michael Crenshaw 5c76d8f027 chore: space in 'Argo CD' (#14987)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2023-08-09 13:16:17 -04:00

849 B

Jsonnet

Any file matching *.jsonnet in a directory app is treated as a Jsonnet file. Argo CD evaluates the Jsonnet and is able to parse a generated object or array.

Build Environment

Jsonnet apps have access to the standard build environment via substitution into TLAs and external variables. It is also possible to add a shared library (e.g. vendor folder) relative to the repository root.

E.g. via the CLI:

argocd app create APPNAME \
  --jsonnet-ext-var-str 'app=${ARGOCD_APP_NAME}' \
  --jsonnet-tla-str 'ns=${ARGOCD_APP_NAMESPACE}' \
  --jsonnet-libs 'vendor'

Or by declarative syntax:

  directory:
    jsonnet:
      extVars:
      - name: app
        value: $ARGOCD_APP_NAME
      tlas:
        - name: ns
          value: $ARGOCD_APP_NAMESPACE
      libs:
        - vendor