helmfile/pkg
Copilot 655399a03b
Bump Helm support to 4.2.1 and 3.21.1 (#2635)
* chore: bump helm release pins

* chore: align helm module metadata

* chore: finalize helm patch bumps

* fix: add --plain-http flag for Helm 3.21+ OCI push in tests

Helm 3.21.1 introduced stricter security checks that reject HTTP
scheme downgrades when pushing to OCI registries, with the error:
  "blob upload Location downgrades scheme from https"

Previously only Helm 4 required --plain-http for HTTP-only OCI
registries. Now Helm 3.21+ also requires this flag.

Add a new requiresPlainHTTPForOCI() helper that returns true for
both Helm 4.x and Helm 3.21+, and use it in execHelmPush() instead
of isHelm4().

* fix: safe fallback in requiresPlainHTTPForOCI when version detection fails

Default to true (require --plain-http) when helm version detection
fails, since any Helm version that supports helm push also supports
the --plain-http flag. This avoids the inconsistent HELMFILE_HELM4
env var fallback which only covered Helm 4.

* fix: update snapshot tests for Helm 4.2.1 OCI pull output

Helm 4.2.1 now outputs additional 'Pulled:' and 'Digest: sha256:...'
lines after each OCI chart pull. The SHA256 digest is non-deterministic
because helm packages include build timestamps, so normalize it with
a regex placeholder.

- Add ociDigestRegex to normalize non-deterministic OCI digest values
- Create output-helm4.yaml for 5 tests that lacked Helm 4 snapshots
- Update output-helm4.yaml for oci_need and postrenderer to include
  the new Pulled/Digest lines from Helm dependency pull operations

* fix: update ociDigestRegex to match empty digest in Helm 4.2.1 OCI pull output

Helm 4.2.1 outputs "Digest: sha256:" (empty hash) when pulling OCI charts.
The regex required at least one hex char ([0-9a-f]+), so it did not match
and the digest was not normalized to $DIGEST in snapshot tests.

Also fix the replacement string: Go regex ReplaceAllString interprets $DIGEST
as a capture group reference (resolving to empty). Use $$DIGEST to produce
a literal $DIGEST in the output.

Signed-off-by: yxxhero <aiopsclub@163.com>

---------

Signed-off-by: yxxhero <aiopsclub@163.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: yxxhero <aiopsclub@163.com>
2026-06-13 16:50:56 +08:00
..
app Bump Helm support to 4.2.1 and 3.21.1 (#2635) 2026-06-13 16:50:56 +08:00
argparser fix #1095 (#1100) 2023-11-01 11:55:55 +08:00
cluster feat: kubedog integration with unified resource handling (#2383) 2026-03-02 17:15:12 +08:00
config feat: support HELMFILE_* env vars for more global flags (#2606) 2026-05-22 09:16:52 +08:00
environment fix: boolean false overrides dropped in multi-document helmfiles (#2527) (#2532) 2026-04-12 09:44:49 +08:00
envvar feat: support HELMFILE_* env vars for more global flags (#2606) 2026-05-22 09:16:52 +08:00
errors build(deps): bump golangci/golangci-lint-action from 6 to 7 (#1975) 2025-03-28 07:52:06 +08:00
event fix: cleanup hooks not receiving error signal (#2475) 2026-03-21 14:29:32 +08:00
exectest feat: add `helmfile unittest` command for helm-unittest integration (#2400) 2026-02-16 09:45:10 +08:00
filesystem fix: eliminate race condition in rewriteChartDependencies (#2541) 2026-04-20 10:15:47 +08:00
hcllang feat: Add IP Network to supported HCL Functions (#2426) 2026-02-26 17:20:48 +08:00
helmexec fix: apply post-renderer to output-dir-template output (#2531) 2026-04-28 09:01:48 +08:00
kubedog fix: Fix broken `trackLogs` functionality in Kubedog tracker (#2630) 2026-06-11 17:17:28 +08:00
maputil fix: array merge regression - layer arrays now replace defaults (#2367) 2026-01-18 14:04:54 +08:00
plugins fix: error on missing secret key when using vals (#2496) 2026-03-24 09:42:54 +08:00
policy build(deps): bump golangci/golangci-lint-action from 6 to 7 (#1975) 2025-03-28 07:52:06 +08:00
remote fix: include query params in HTTP getter cache key (#2399) 2026-02-14 09:31:53 +08:00
resource feat: kubedog integration with unified resource handling (#2383) 2026-03-02 17:15:12 +08:00
runtime refactor(yaml): switch yaml library import paths from gopkg.in to go.yaml.in (#2114) 2025-08-01 11:28:39 +08:00
state fix: support array of maps in set/setTemplate values (#2615) 2026-05-31 09:57:35 +08:00
testhelper fix: eliminate os.Chdir in sequential helmfiles to fix relative path resolution (#2410) 2026-02-22 09:21:46 +08:00
testutil feat: add `helmfile unittest` command for helm-unittest integration (#2400) 2026-02-16 09:45:10 +08:00
tmpl refactor(yaml): switch yaml library import paths from gopkg.in to go.yaml.in (#2114) 2025-08-01 11:28:39 +08:00
yaml refactor(yaml): switch yaml library import paths from gopkg.in to go.yaml.in (#2114) 2025-08-01 11:28:39 +08:00