Skip to main content
Version: 1.3.x

Hauler Store Add File

Overview​

hauler store add file adds a file to the store.

An example with available flags...

hauler store add file <file> --name <name>

Command Overview​

Usage:
hauler store add file [flags]

Examples:
# fetch local file
hauler store add file file.txt

# fetch remote file
hauler store add file https://get.rke2.io/install.sh

# fetch remote file and assign new name
hauler store add file https://get.hauler.dev --name hauler-install.sh

Flags:
-h, --help help for file
-n, --name string (Optional) Rewrite the name of the file

Flags for Keyless Verification:
--certificate-identity-regexp string (Optional) OIDC identity tied to certificate
--certificate-oidc-issuer string (Optional) OIDC issuer
--certificate-github-workflow-repository string (Optional) Repository claim from GH identity token for GitHub workflows

Global Flags:
-d, --haulerdir string Set the location of the hauler directory (default $HOME/.hauler)
--ignore-errors Ignore/Bypass errors (i.e. warn on error) (defaults false)
-l, --log-level string Set the logging level (i.e. info, debug, warn) (default "info")
-r, --retries int Set the number of retries for operations (default 3)
-s, --store string Set the directory to use for the content store

Example Commands for Files​

# fetch local file
hauler store add file file.txt

# fetch remote file
hauler store add file https://get.rke2.io/install.sh

# fetch remote file and assign new name
hauler store add file https://get.hauler.dev --name hauler-install.sh

Hauler Manifest for Files​

hauler-file-manifest.yaml
apiVersion: content.hauler.cattle.io/v1
kind: Files
metadata:
name: hauler-content-files-example
spec:
files:
- path: <file>
name: <name>

Example Manifest for Files​

hauler-file-manifest.yaml
apiVersion: content.hauler.cattle.io/v1
kind: Files
metadata:
name: hauler-content-files-example
spec:
files:
# fetch remote file
- path: https://get.rke2.io
# fetch remote file and assign new name
- path: https://get.rke2.io
name: install.sh
# fetch local file
- path: path/to/local/file.txt
# fetch local file and assign new name
- path: path/to/local/file.txt
name: local-file.txt