Skip to content

feat: expose UDS Core config as native Zarf values#2762

Open
briantwatson wants to merge 31 commits into
mainfrom
feat/core-57-zarf-values
Open

feat: expose UDS Core config as native Zarf values#2762
briantwatson wants to merge 31 commits into
mainfrom
feat/core-57-zarf-values

Conversation

@briantwatson

@briantwatson briantwatson commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Description

This PR adds native Zarf values support to UDS Core packages, allowing users to deploy and customize packages with zarf package deploy --values without requiring a UDS bundle.

Existing Variable Compatibility

  • Existing Zarf variable workflows remain supported and unchanged.
  • Variables such as DOMAIN and ADMIN_DOMAIN continue to use tokens such as ###ZARF_VAR_DOMAIN###.
  • Values are resolved before Helm rendering and take precedence over variables when explicitly provided.
  • When values are not supplied, existing variable defaults and fallback behavior continue to apply.

Zarf Values

  • Adds package-level zarf-values.yaml files for values-enabled package layers.
  • Adds source package values files and chart mappings.
  • Uses broad chart pass-through mappings so users can override supported chart configuration without needing package-specific wiring for every value.
  • Keeps package-facing values separate from underlying chart paths.
  • Supports top-level domain and adminDomain configuration across applicable charts.
  • Admin-domain precedence is:
    1. Explicit adminDomain value
    2. ADMIN_DOMAIN variable
    3. admin.<domain>
  • Portal uses its existing chart and does not require a Portal chart update.

Protected Configuration

  • Adds excludePaths to prevent user overrides of deployment-controlled settings.
  • Protected settings include image references, registries, security contexts, selected service configuration, and other package-managed values.

Schema Generation

  • Adds generated package-facing schemas at packages/*/zarf-values.schema.json.
  • Adds a task to regenerate schemas from the package definitions:
    uds run -f tasks/lint.yaml values-generate

Linting and Verification

  • Adds values linting to detect mapping and schema regressions.
  • Adds values verification to render packages and assert that:
    • Overrides reach their intended charts.
    • Excluded values are not rendered.
    • Domain and admin-domain precedence works as expected.
  • Adds values-deployment equivalency testing to the CI matrix.
  • Relevant checks include:
    uds run -f tasks/lint.yaml values-lint
    uds run -f tasks/lint.yaml values-verify
    uds run test:uds-core-values-e2e --set FLAVOR=upstream

Compatibility Note

  • Deployments using native Zarf values require Zarf v0.79.0 or newer because of the package pull behavior fix for values files and schemas.

Related Issue

Fixes CORE-57

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Other (security config, docs update, etc)

Steps to Validate

  • Ran uds run lint:values-lint — all 5 packages lint clean
  • Verified --features values=true flag behavior against Zarf source code and live testing
  • Confirmed deep-merge semantics and {} no-op on a live k3d cluster with a podinfo probe package
  • Confirmed must-exist rule hard-fails at deploy (not create)
  • Confirmed list replace behavior (backends key in podinfo)
  • Confirmed excludePaths are source-rooted (validated against Zarf test source)

Checklist before merging

@briantwatson
briantwatson requested a review from a team as a code owner June 23, 2026 14:42
@greptile-apps

greptile-apps Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds native Zarf values support across all UDS Core source packages, enabling zarf package deploy --values without requiring a UDS bundle. It introduces zarf-values.yaml defaults, values: chart mappings with excludePaths for protected settings, schema generation and validation, and a complete vitest-based verification harness.

  • Domain/adminDomain precedence is implemented consistently via Zarf Go templates across all affected charts (pepr, keycloak, istio gateways, grafana, portal), replacing the previous ###ZARF_VAR_*### two-step pattern.
  • Protected chart settings (images, registries, security contexts) are blocked via excludePaths, with vitest specs asserting SHOULD_NOT_APPEAR strings are absent from rendered manifests.
  • CI integration adds a values-type matrix entry running a full cluster equivalency test and a schema-drift autogenerated-check.

Confidence Score: 5/5

Safe to merge — three-tier domain/adminDomain precedence is consistently implemented and verified; backward compatibility with existing variable-based deployments is preserved.

Domain-precedence logic is uniformly applied and verified by five domain scenarios in vitest specs. Protected settings are blocked via excludePaths and tested with SHOULD_NOT_APPEAR probes. Full equivalency CI job closes the loop with a live cluster deploy. The two flagged items are style and robustness suggestions with no impact on correctness.

src/grafana/values/values.yaml — the four grafana.ini fields use a bespoke four-branch conditional that diverges from the canonical pattern used everywhere else.

Important Files Changed

Filename Overview
src/pepr/uds-operator-config/values.yaml Migrated from ###ZARF_VAR_*### tokens to Zarf Go template expressions; domain/adminDomain implement the full precedence chain.
src/pepr/uds-operator-config/templates/clusterconfig.yaml Adds legacy token guard for adminDomain and boolean-safe pipeline for allowAllNsExemptions.
src/istio/charts/uds-istio-config/templates/gateway.yaml Admin gateway domain logic reads adminDomain first and falls back to admin. correctly.
src/istio/values/config-admin.yaml Replaced Helm-evaluated token expression with Zarf-resolved domain + adminDomain pair.
src/grafana/values/values.yaml Now a templatedValuesFile; top-level values use canonical pattern but grafana.ini entries use a divergent four-branch conditional with dead ###ZARF_VAR_*### guard.
test/values/helpers.ts New test harness with manifest rendering and caching; YAML override files generated via JSON.stringify which is fragile for strings containing newlines.
src/keycloak/chart/templates/statefulset.yaml UDS_ADMIN_DOMAIN now uses the same adminDomain fallback logic as gateway and pepr changes.
tasks/lint.yaml Adds values-lint, values-generate, and build-pepr tasks integrated into the main lint flow.
tasks/test.yaml Adds uds-core-values-e2e task for full cluster equivalency testing.
.github/workflows/pull-request-conditionals.yaml Adds values test_type matrix entry to trigger the new values E2E test in CI.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["zarf package deploy --values"] --> B["Zarf values merge"]
    B --> C{".Values.domain set?"}
    C -- yes --> D["domain = .Values.domain"]
    C -- no --> E["domain = .Variables.DOMAIN"]
    D & E --> F{".Values.adminDomain set?"}
    F -- yes --> G["adminDomain = .Values.adminDomain"]
    F -- no --> H{".Variables.ADMIN_DOMAIN set?"}
    H -- yes --> I["adminDomain = .Variables.ADMIN_DOMAIN"]
    H -- no --> J["adminDomain = admin.<domain>"]
    G & I & J --> K["Zarf resolves templatedValuesFiles"]
    K --> L["Helm renders charts"]
    L --> M{"excludePaths filter"}
    M --> N["Final Kubernetes manifests"]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A["zarf package deploy --values"] --> B["Zarf values merge"]
    B --> C{".Values.domain set?"}
    C -- yes --> D["domain = .Values.domain"]
    C -- no --> E["domain = .Variables.DOMAIN"]
    D & E --> F{".Values.adminDomain set?"}
    F -- yes --> G["adminDomain = .Values.adminDomain"]
    F -- no --> H{".Variables.ADMIN_DOMAIN set?"}
    H -- yes --> I["adminDomain = .Variables.ADMIN_DOMAIN"]
    H -- no --> J["adminDomain = admin.<domain>"]
    G & I & J --> K["Zarf resolves templatedValuesFiles"]
    K --> L["Helm renders charts"]
    L --> M{"excludePaths filter"}
    M --> N["Final Kubernetes manifests"]
Loading

Reviews (6): Last reviewed commit: "chore: helm unit test fix" | Re-trigger Greptile

Comment thread docs/reference/configuration/zarf-values.mdx Outdated
Comment thread docs/reference/configuration/zarf-values.mdx Outdated
Comment thread packages/identity-authorization/zarf-values.yaml Outdated
Comment thread packages/standard/zarf-values.yaml Outdated
@briantwatson

Copy link
Copy Markdown
Contributor Author

@greptile review

@slaskawi

Copy link
Copy Markdown
Contributor

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 673eb8452a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/base/zarf.yaml
Comment thread packages/identity-authorization/zarf-values.schema.json Outdated
Comment thread src/loki/common/zarf.yaml
Comment thread tasks/values-verify.yaml Outdated
Comment thread packages/standard/zarf-values.yaml Outdated
@Racer159

Racer159 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

The other thing I will call out for the release is that there are some borked versions of Zarf that might cause issues with this if people have not updated UDS CLI / Zarf - the pull: always pull values.yaml and values.schema.json is what fixes this in v0.79.0 but this may lock UDS Core to that version+ for some use cases...

(v0.63.0 - pre-values works fine)
image

(v0.64.0 - post-values introduction does not work on pull/deploy)
image

(v0.78.0 - before the fix also does not work)
image

(v0.79.0 - now works and is fixed)
image

so basically Zarf versions between 0.64.0 and 0.78.0 will be 💀 with this change...

Comment thread packages/identity-authorization/zarf-values.schema.json

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lula Compliance Overview

Please review the changes to ensure they meet compliance standards.

Reviewed Changes

Lula reviewed 30 files changed that affect compliance.


File Lines Changed
.github/workflows/pull-request-conditionals.yaml 154–189

UUID: 11948466-9230-4498-be44-dbac784d86d1
sha256: 7e9888ac82452d1c09bb3511aa1785c1622a476191a2fcb1148068c4110c71af


Tip: Customize your compliance reviews with Lula.

@briantwatson

Copy link
Copy Markdown
Contributor Author

Summary since first review

  • Major refactor: reworked the chart value mappings from enumerating a handful of keys to a broad pass-through per chart (sourcePath: .<chart>, targetPath: .) with excludePaths negative logic to block what should not be set (image refs, security contexts, Service wiring, Loki deployment mode, Grafana sidecar, SSO wiring, etc.). Upstream charts are now fully overridable except the guarded paths.
  • Converted the standalone values-verify diff check into a real values-deploy equivalency e2e wired into CI (values test type); excluded velero (storage not values-exposed, see below).
  • Following feedback: added egressCidr for external Postgres (Keycloak, Grafana); fixed authservice.replicaCount schema (minimum: 0 to 1); exposed Falco / runtime-security values that were missing; doc accuracy fixes (exposed vs excluded paths, top-level domain, no em-dashes).
  • Added a single top-level domain value that fans out to Keycloak, the Istio tenant and passthrough gateways, the Pepr operator, and the portal. Scoped adminDomain value out (deferred, see below).
  • Keycloak chart: moved the admin.<domain> fallback from the value into its consumers so it stays overridable (helm unittest added).

Follow-ups (deferred)

  • Top-level adminDomain value: not included. Admin domains (admin gateway, Grafana, Keycloak admin console) stay driven by the DOMAIN/ADMIN_DOMAIN Zarf variables. Reason: admin charts derive admin.<domain> in-template, but a value-fed adminDomain arrives as the literal ###ZARF_VAR_ADMIN_DOMAIN### placeholder at Helm-render time (Zarf substitutes it only afterward), so the in-template fallback never fires. A future fix (operator-fed or pre-render derivation) should be verified on a real non-default-domain deploy, which the current k3d CI cannot do since it only has certs/DNS for *.uds.dev.
  • Velero storage: its BackupStorageLocation (bucket/prefix) is not in the values surface; it stays on Zarf variables + bundle overrides. Excluded from the values e2e validation only (bundle e2e still fully validates it). Resolve in follow-up by exposing velero storage via values.

Comment thread src/keycloak/chart/values.yaml
Comment thread src/keycloak/chart/templates/statefulset.yaml Outdated
Comment thread src/keycloak/common/zarf.yaml Outdated
@github-actions
github-actions Bot dismissed their stale review July 17, 2026 13:38

Superseded by a new Lula compliance review.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lula Compliance Overview

Please review the changes to ensure they meet compliance standards.

Reviewed Changes

Lula reviewed 30 files changed that affect compliance.


File Lines Changed
.github/workflows/pull-request-conditionals.yaml 154–189

UUID: 11948466-9230-4498-be44-dbac784d86d1
sha256: 7e9888ac82452d1c09bb3511aa1785c1622a476191a2fcb1148068c4110c71af


Tip: Customize your compliance reviews with Lula.

@joelmccoy

Copy link
Copy Markdown
Contributor

@greptileai review

Comment thread tasks/test.yaml Outdated

@joelmccoy joelmccoy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I know you are refactoring a bit more, so will hold off on official approval

chance-coleman
chance-coleman previously approved these changes Jul 17, 2026

@chance-coleman chance-coleman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 This is awesome, great work!

@briantwatson
briantwatson requested a review from a team as a code owner July 17, 2026 15:54
@github-actions
github-actions Bot dismissed their stale review July 17, 2026 15:54

Superseded by a new Lula compliance review.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lula Compliance Overview

Please review the changes to ensure they meet compliance standards.

Reviewed Changes

Lula reviewed 30 files changed that affect compliance.


File Lines Changed
.github/workflows/pull-request-conditionals.yaml 154–189

UUID: 11948466-9230-4498-be44-dbac784d86d1
sha256: 7e9888ac82452d1c09bb3511aa1785c1622a476191a2fcb1148068c4110c71af


Tip: Customize your compliance reviews with Lula.

@github-actions
github-actions Bot dismissed their stale review July 17, 2026 15:54

Superseded by a new Lula compliance review.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lula Compliance Overview

Please review the changes to ensure they meet compliance standards.

Reviewed Changes

Lula reviewed 30 files changed that affect compliance.


File Lines Changed
.github/workflows/pull-request-conditionals.yaml 154–189

UUID: 11948466-9230-4498-be44-dbac784d86d1
sha256: 7e9888ac82452d1c09bb3511aa1785c1622a476191a2fcb1148068c4110c71af


Tip: Customize your compliance reviews with Lula.

@github-actions
github-actions Bot dismissed their stale review July 17, 2026 16:10

Superseded by a new Lula compliance review.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lula Compliance Overview

Please review the changes to ensure they meet compliance standards.

Reviewed Changes

Lula reviewed 30 files changed that affect compliance.


File Lines Changed
.github/workflows/pull-request-conditionals.yaml 154–189

UUID: 11948466-9230-4498-be44-dbac784d86d1
sha256: 7e9888ac82452d1c09bb3511aa1785c1622a476191a2fcb1148068c4110c71af


Tip: Customize your compliance reviews with Lula.

@briantwatson
briantwatson requested a review from joelmccoy July 17, 2026 16:22
@briantwatson

Copy link
Copy Markdown
Contributor Author

@greptile review

Comment thread bundles/base-shim/README.md Outdated
Comment thread docs/concepts/configuration-and-packaging/package-requirements.mdx Outdated
Comment thread docs/concepts/configuration-and-packaging/package-requirements.mdx Outdated
joelmccoy
joelmccoy previously approved these changes Jul 17, 2026
@github-actions
github-actions Bot dismissed their stale review July 17, 2026 19:26

Superseded by a new Lula compliance review.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lula Compliance Overview

Please review the changes to ensure they meet compliance standards.

Reviewed Changes

Lula reviewed 30 files changed that affect compliance.


File Lines Changed
.github/workflows/pull-request-conditionals.yaml 154–189

UUID: 11948466-9230-4498-be44-dbac784d86d1
sha256: 7e9888ac82452d1c09bb3511aa1785c1622a476191a2fcb1148068c4110c71af


Tip: Customize your compliance reviews with Lula.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants