Dagweave catalog

Download a file

download-filev1.0.1updated 2026-08-022 versions

Download a file from a URL to a filesystem path (following redirects), with an optional bearer token read from a Kubernetes Secret.

Install v1.0.1

Installs the template into your Argo namespace. The URL is pinned to this version.

kubectl apply -n argo -f https://catalog.dagweave.com/api/v1/items/download-file/1.0.1/template.yaml

Or with the Argo CLI:

argo template create -n argo https://catalog.dagweave.com/api/v1/items/download-file/1.0.1/template.yaml

Facts

Category
HTTP
Tags
curl http
Entrypoint
download
Template SHA-256
0158f3a64924a0751e3041c249b0a069b5651ccbd8d2b7c6346152b9f27847c4
Source
download-file at catalog commit 67458f7
API
item document, latest template.yaml

Images and provenance

Every image is pinned by digest, so a rebuilt tag can never change what this version runs.

RepositoryTagDigest
curlimages/curl8.23.0sha256:3fb7e13e5d179a845c97d78204f3f1064d1907037f26a3ebf91710571151fd93

Parameters

NameDescriptionDefault
url required Absolute URL of the file to download. Redirects are followed.
Example https://example.com/data.csv
none
dest-path Filesystem path to write the downloaded file to. /tmp/download
token-secret-key Key within the Secret that holds the bearer token. token
token-secret-name Name of the Kubernetes Secret holding an optional bearer token. If the Secret is absent the Authorization header is omitted. download-token

WorkflowTemplate

Download template.yaml

apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
  name: download-file
  labels:
    dagweave.io/catalog-item: download-file
  annotations:
    # The catalog semver this manifest was authored at. The dagweave app records
    # (catalog-item-id, semver) -> content-hash -> base-vN when it mints the tenant
    # cluster name via ResolveOrMint. Keep in sync with metadata.yaml `version`.
    dagweave.io/catalog-version: "1.0.1"
    dagweave.io/catalog-category: "HTTP"
spec:
  entrypoint: download
  templates:
    - name: download
      inputs:
        parameters:
          # Absolute URL of the file to download. Redirects are followed.
          - name: url
          # Filesystem path to write the downloaded file to.
          - name: dest-path
            default: /tmp/download
          # Name/key of a Kubernetes Secret holding an optional bearer token. If the
          # Secret or key is absent the Authorization header is omitted.
          - name: token-secret-name
            default: download-token
          - name: token-secret-key
            default: token
      container:
        # Pinned by digest per the catalog convention: an image rebuild can never
        # silently change the behaviour of an already-released item version.
        # curlimages/curl:8.23.0
        image: curlimages/curl@sha256:3fb7e13e5d179a845c97d78204f3f1064d1907037f26a3ebf91710571151fd93
        command: [sh, -c]
        # Values are passed as env vars (below), never interpolated into the shell.
        # The optional bearer token is appended via positional params so a blank
        # value never leaks a stray flag into the curl invocation.
        args:
          - |
            set -eu
            if [ -n "${TOKEN:-}" ]; then
              set -- -H "Authorization: Bearer ${TOKEN}"
            else
              set --
            fi
            curl -sSfL "$@" -o "${DEST_PATH}" "${URL}"
            echo "downloaded ${URL} -> ${DEST_PATH}"
        env:
          - name: URL
            value: "{{inputs.parameters.url}}"
          - name: DEST_PATH
            value: "{{inputs.parameters.dest-path}}"
          - name: TOKEN
            valueFrom:
              secretKeyRef:
                name: "{{inputs.parameters.token-secret-name}}"
                key: "{{inputs.parameters.token-secret-key}}"
                optional: true

Version history

Read from the item's changelog. Each version has its own JSON document; the pinned catalogue vendors the manifest of the latest one, so that is the version that installs.

  1. 1.0.1 latest 2026-08-02

    Move curlimages/curl from 8.11.1 to 8.21.0. Fixable CRITICAL/HIGH drops from 26 to 1.

    kubectl apply -n argo -f https://catalog.dagweave.com/api/v1/items/download-file/1.0.1/template.yaml
    argo template create -n argo https://catalog.dagweave.com/api/v1/items/download-file/1.0.1/template.yaml

    version document, template.yaml

  2. 1.0.0 2026-07-17

    Initial release.

    This release is documented, but its manifest is not vendored here, so it has no install command. Version document

Run it once

After installing, from the command line.

argo submit -n argo --from workflowtemplate/download-file \
  -p url=https://example.com/data.csv

Workflow that references it

A Workflow with the required parameters filled from the examples.

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: download-file-
spec:
  workflowTemplateRef:
    name: download-file
  arguments:
    parameters:
      - name: url
        value: "https://example.com/data.csv"

As a step of a larger workflow

steps:
  - - name: download-file
      templateRef:
        name: download-file
        template: download