Skip to content

feat(workload): warn when a HelmRelease valuesFrom can't be resolved offline#6214

Draft
devantler wants to merge 2 commits into
mainfrom
claude/validate-valuesfrom-degradation-6087
Draft

feat(workload): warn when a HelmRelease valuesFrom can't be resolved offline#6214
devantler wants to merge 2 commits into
mainfrom
claude/validate-valuesfrom-degradation-6087

Conversation

@devantler

Copy link
Copy Markdown
Contributor

🤖 Generated by the Daily AI Engineer

Why

workload validate/scan render Helm charts offline so they check what Flux actually applies. When a chart pulls values from a cluster-managed ConfigMap/Secret that isn't in the repo, those values were silently dropped — the gate reported success while quietly validating a chart rendered with incomplete values. Users had no signal that coverage had diverged from the real cluster.

What

Adds an honest, non-fatal warning when a required (non-optional) valuesFrom reference can't be resolved offline, naming the HelmRelease and the reference so the user can act. Optional references stay silent (matching Flux). No change to pass/fail or output — a warning only, on the same channel that already flags unrenderable chart sources. Applies to both validate and scan.

Fixes #6213
Part of #5344

…offline

workload validate/scan render HelmRelease charts offline so the real applied
manifests are checked. Values come from spec.values + valuesFrom ConfigMap/Secret
refs resolved from the in-repo stream. A non-optional valuesFrom whose object is
not in the stream (typically cluster-managed) was silently dropped: the chart
still rendered, but with incomplete values, so the offline output could diverge
from what Flux applies with no signal to the user.

Surface this through the existing render-degradation channel as a new
DegradationPartialValues kind with an accurate warning ("rendered ... with
incomplete values ... valuesFrom X could not be resolved offline"), distinct from
the "skipped Helm render" message (the chart did render). Optional references are
Flux-tolerated and stay silent. Warning only — no change to pass/fail, exit codes,
or rendered output. Applies to both validate and scan via the shared render path.

Extract lookupValuesRef as the single resolvability check shared by applyValuesFrom
and the new unresolvedValueRefs inspector. Tests cover all three states
(non-optional-missing warns, optional-missing silent, resolvable silent) at both
the render-package and end-to-end command levels.

Fixes #6213
Part of #5344

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

MegaLinter analysis: Success

✅ Linters with no issues

actionlint, bash-exec, git_diff, hadolint, jscpd, jsonlint, lychee, markdown-table-formatter, markdownlint, prettier, prettier, shellcheck, shfmt, stylelint, syft, trivy-sbom, trufflehog, v8r, v8r, yamllint

Notices

📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining SECURITY_SUGGESTIONS: false)

See detailed reports in MegaLinter artifacts

MegaLinter is graciously provided by OX Security
Show us your support by starring ⭐ the repository

@github-code-quality

github-code-quality Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: Go

Go / code-coverage/go

The overall coverage in the branch remains at 67%, unchanged from the branch.

Show a code coverage summary of the most impacted files.
File 3ff2d8c 90a5269 +/-
pkg/svc/provisi...base/bringup.go 92% 90% -2%
pkg/svc/gitops/...der/resolver.go 88% 88% 0%
pkg/svc/gitops/...ender/render.go 98% 98% 0%
pkg/cli/cmd/workload/render.go 80% 82% +2%

Updated July 17, 2026 19:11 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Daily AI Engineer

Verification + dependency note. RED/GREEN proven in-process: TestExpandDegradesOnUnresolvableValuesFrom (render pkg) and TestValidateWarnsOnUnresolvableValuesFrom (end-to-end command) — the warning fires for a non-optional unresolvable valuesFrom, and stays silent for optional/resolvable refs.

While user-evaluating via the real binary I found this warning (and every existing degradation/CRD/CEL warning) is currently swallowed on the CLI by a pre-existing error-handler bug that discards stderr on successful runs — filed as #6215 and fixed in #6216. So this warning only becomes user-visible once #6216 lands. This PR's logic is correct and independently mergeable; its user-facing effect is gated on #6216, so I am not self-promoting it until the effect is observable.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: 🫴 Ready

Development

Successfully merging this pull request may close these issues.

feat(validate): warn when a HelmRelease valuesFrom can't be resolved offline (render fidelity)

1 participant