Use Bundle Overrides
What you’ll accomplish
Section titled “What you’ll accomplish”Bundle overrides let you customize Helm charts inside Zarf packages without modifying the packages themselves. By the end of this guide you’ll know how to:
- Override static Helm values at bundle-creation time
- Define runtime-configurable variables
- Use
uds-config.yamlto manage configuration - Understand variable precedence across all override sources
Prerequisites
Section titled “Prerequisites”- UDS CLI installed
- A
uds-bundle.yamlreferencing at least one Zarf package with Helm charts
Before you begin
Section titled “Before you begin”The overrides block in uds-bundle.yaml maps to the structure of a Zarf package:
overrides: <component-name>: # Zarf component containing the chart <chart-name>: # Helm chart name within that component namespace: ... valuesFiles: [...] values: [...] variables: [...]-
Add static value overrides
Use the
valueskey to set Helm values that are fixed at bundle-creation time and cannot be changed at deploy time:uds-bundle.yaml packages:- name: helm-overrides-packagepath: "path/to/pkg"ref: 0.0.1overrides:helm-overrides-component:podinfo:values:- path: "replicaCount"value: 2- path: "podinfo.tolerations"value:- key: "unicorn"operator: "Equal"value: "defense"effect: "NoSchedule"The
pathuses dot notation to locate the value in the chart’svalues.yaml. -
Add a values file
For bulk overrides, provide a YAML file via
valuesFiles:uds-bundle.yaml packages:- name: helm-overrides-packagepath: "path/to/pkg"ref: 0.0.1overrides:helm-overrides-component:podinfo:valuesFiles:- overrides/podinfo-values.yamlvalues:- path: "replicaCount"value: 2overrides/podinfo-values.yaml podAnnotations:customAnnotation: "customValue"ui:message: "Hello from bundle"When multiple
valuesFilesare listed, later files take precedence over earlier ones. Staticvaluestake precedence over allvaluesFiles. -
Add runtime-configurable variables
Unlike
values,variablescan be overridden at deploy time:uds-bundle.yaml packages:- name: helm-overrides-packagepath: "path/to/pkg"ref: 0.0.1overrides:helm-overrides-component:podinfo:variables:- name: UI_COLORpath: "ui.color"description: "Set the color for podinfo's UI"default: "purple"- name: SECRET_VALpath: "testSecret"description: "A sensitive value, masked in output"sensitive: true- name: TLS_CERTpath: "tls.cert"description: "Path to a certificate file"type: fileVariable types:
raw(default): string, int, map, etc.file: the variable resolves to the contents of the referenced file
-
Override a variable at deploy time
Three methods are available, in order of increasing precedence:
Place a
uds-config.yamlin the same directory as the bundle:uds-config.yaml variables:helm-overrides-package:ui_color: green # variable names are case-insensitivePrefix the variable name with
UDS_:Terminal window UDS_UI_COLOR=green uds deploy uds-bundle-helm-overrides.tar.zst --confirmTerminal window # Apply to all packagesuds deploy uds-bundle-helm-overrides.tar.zst --set ui_color=green# Apply to a specific package onlyuds deploy uds-bundle-helm-overrides.tar.zst --set helm-overrides-package.ui_color=green -
Share a value across all packages with
uds-config.yamlUse the
sharedkey to apply a variable to every package in the bundle without repeating it per-package:uds-config.yaml shared:domain: uds.dev # applied to all packages in the bundlePlace the file in your working directory or set its path via the
UDS_CONFIGenvironment variable. Theuds-config.yamlalso supportsoptions(global CLI settings) andvariables(per-package overrides); see the full reference for details. -
Share variables across packages
Use
exportsandimportsto pass a variable from one package to another:uds-bundle.yaml packages:- name: output-varrepository: localhost:888/output-varref: 0.0.1exports:- name: OUTPUT- name: receive-varrepository: localhost:888/receive-varref: 0.0.1imports:- name: OUTPUTpackage: output-varFor variables shared across all packages without import/export, use the
sharedkey inuds-config.yamlor aUDS_-prefixed environment variable. -
Override a Helm chart’s namespace
uds-bundle.yaml overrides:podinfo-component:unicorn-podinfo:namespace: custom-podinfovalues:- path: "replicaCount"value: 1
Verification
Section titled “Verification”View all configurable overrides and variables for a bundle before deploying:
uds inspect --list-variables uds-bundle-<name>.tar.zstRun uds deploy without --confirm to see the pre-deploy summary showing all currently set values.
Troubleshooting
Section titled “Troubleshooting”Problem: Override has no effect
Section titled “Problem: Override has no effect”Symptom: A value or variable override is not applied after deployment.
Solution: Verify the <component> and <chart> names match those in the Zarf package’s zarf.yaml.
Problem: File variable not applied
Section titled “Problem: File variable not applied”Symptom: A file-type variable is not resolved at deploy time.
Solution: Ensure the variable has type: file set in the bundle definition.
Problem: Sensitive value visible in output
Section titled “Problem: Sensitive value visible in output”Symptom: A secret value is printed in plain text during deploy.
Solution: Confirm sensitive: true is set on the variable in the bundle definition.
Problem: File path not resolving
Section titled “Problem: File path not resolving”Symptom: A relative file path in a variable is not found at deploy time.
Solution: Relative file paths are resolved relative to the uds-config.yaml directory.
Related Documentation
Section titled “Related Documentation”- Use UDS Runner: Automate workflows with
tasks.yaml. - Monitor a Cluster: Stream real-time Pepr logs from a running cluster.