Commit graph

95 commits

Author SHA1 Message Date
Matheus Pimenta
59ece92bed
pkg/kube: introduce support for custom kstatus readers
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2026-01-12 18:16:26 +00:00
George Jenkins
fa41d60d73
Merge pull request #31239 from StephanieHhnbrg/test-actions-pkg
Some checks are pending
build-test / build (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
golangci-lint / golangci-lint (push) Waiting to run
release / release (push) Waiting to run
release / canary-release (push) Waiting to run
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run
Add tests to action package to improve coverage
2026-01-02 20:24:27 -08:00
Stephanie Hohenberg
bb9356e182 fixes lint issue
Signed-off-by: Stephanie Hohenberg <stephanie.hohenberg@gmail.com>
2025-12-03 13:18:00 +05:30
Stephanie Hohenberg
8cf4ad73c3 updates tests after rebase from master
Signed-off-by: Stephanie Hohenberg <stephanie.hohenberg@gmail.com>
2025-12-03 13:18:00 +05:30
Stephanie Hohenberg
31131cff9b Add tests to action package to improve coverage
Signed-off-by: Stephanie Hohenberg <stephanie.hohenberg@gmail.com>
2025-12-03 13:17:58 +05:30
Benoit Tigeot
ce273eea48
fix: preserve vendor suffixes in KubeVersion.GitVersion
Helm 3.19.0 introduced a regression where vendor-specific suffixes
(e.g., -gke.1245000, -eks-4096722, +) are stripped from
.Capabilities.KubeVersion.GitVersion, breaking charts that detect
managed Kubernetes platforms.

The root cause was using k8sversion.ParseGeneric().String() which
intentionally discards vendor suffixes. The fix stores both the full
version (with vendor suffix) and a normalized version. String() returns
the normalized version for constraint checking (e.g., ">= 1.21.0"),
while Version/GitVersion preserve the full string for template access.

Fixes #31423
Related to #31063, #31078

Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-11-18 15:28:16 +01:00
Matt Farina
ca8eae9361
Reproducible chart archive builds
Building the same chart into an archive multiple times will have
the same sha256 hash.

Perviously, the time in the headers for a file was time.Now() which
changed each time. The time is now collected from the operating
system when the file is loaded and this time is used.

Fixes: #3612

Signed-off-by: Matt Farina <matt.farina@suse.com>
2025-10-29 11:49:22 -04:00
Matt Farina
a229bf6529 Ensure the release interface is used in actions instead of the type
Signed-off-by: Matt Farina <matt.farina@suse.com>
2025-10-10 11:52:33 -04:00
Matt Farina
f80cbe43d0 Moved release objects to enable versioning
Signed-off-by: Matt Farina <matt.farina@suse.com>
2025-10-10 11:49:08 -04:00
George Jenkins
f21b143bef refactor: Replace action 'DryRun' string with DryRunStrategy type + deprecations
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
2025-09-21 08:03:02 -07:00
Matt Farina
d2236e95ed
Merge pull request #31303 from mattfarina/unified-loader
Update the action interfaces for chart apiversions
2025-09-18 14:22:31 -06:00
Matt Farina
8dc7c57f50
Update the action interfaces for chart apiversions
This change is about handling the interfaces to public functions for
different chart apiVersions. The internals are still focused on v2.
This enables v3 to be layered in layer.

Signed-off-by: Matt Farina <matt.farina@suse.com>
2025-09-17 15:19:02 -04:00
Terry Howe
3e1dd9a5dc
chore: remove pkg/time which is no longer needed
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
2025-09-15 12:29:35 -06:00
Scott Rigby
315b13334c
Merge pull request #31258 from StephanieHhnbrg/test-unreachable-client
Refactor unreachableKubeClient for testing into failingKubeClient
2025-09-08 17:54:48 -04:00
Stephanie Hohenberg
e19d9fb6ee Refactor unreachableKubeClient for testing into failingKubeClient
Signed-off-by: Stephanie Hohenberg <stephanie.hohenberg@gmail.com>
2025-09-07 11:53:34 -04:00
Scott Rigby
50358d7ffd
Merge pull request #31200 from TerryHowe/fix-install-tests
fix: installer action goroutine count
2025-09-04 22:35:55 -04:00
Matt Farina
9dcc49cbd5 Move lint pkg to be part of each chart version
Linting is specific to the chart versions. A v2 and v3 chart will
lint differently.

To accomplish this, packages like engine need to be able to handle
different chart versions. This was accomplished by some changes:

1. The introduction of a Charter interface for charts
2. The ChartAccessor which is able to accept a chart and then
   provide access to its data via an interface. There is an
   interface, factory, and implementation for each version of
   chart.
3. Common packages were moved to a common and util packages.
   Due to some package loops, there are 2 packages which may
   get some consolidation in the future.

The new interfaces provide the foundation to move the actions
and cmd packages to be able to handle multiple apiVersions of
charts.

Signed-off-by: Matt Farina <matt.farina@suse.com>
2025-09-02 12:14:37 -04:00
Terry Howe
b12cd28503
fix: installer action goroutine count
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
2025-08-29 07:19:39 -06:00
George Jenkins
a0d6b0d383
Merge pull request #13629 from gjenkins8/rename_atomic_rollbackonfailure
Rename 'atomic' -> 'rollback-on-failure'
2025-08-22 11:20:18 -07:00
joemicky
762ef3ee80 refactor: omit unnecessary reassignment
Signed-off-by: joemicky <joemickychang@outlook.com>
2025-08-14 19:30:33 +08:00
George Jenkins
08840f042c Rename 'atomic' -> 'rollback-on-failure'
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
2025-07-21 13:47:15 -07:00
Danilo Bürger
055c4e2bec
Moved url comparison to own function
Signed-off-by: Danilo Bürger <info@danilobuerger.de>
2025-07-13 15:38:54 +02:00
Scott Rigby
069b525332
Merge pull request #13586 from jessesimpson36/cleaner-stacktraces
fix: add formatting for errors to make multiline stacktraces in helm templates
2025-06-03 21:37:54 -04:00
Matthieu MOREL
56a2bb4188 chore: enable usetesting linter
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-05-30 08:12:11 +02:00
Matthieu MOREL
157f0ba10a chore: enable thelper
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-05-16 10:25:08 +02:00
Jesse Simpson
0a7dd4b269
test: adjust failing test on extra whitespace
Signed-off-by: Jesse Simpson <jesse.simpson36@gmail.com>
2025-04-24 19:17:28 -04:00
Jesse Simpson
edf0f7be59
test: adjust formatting for error in test
Signed-off-by: Jesse Simpson <jesse.simpson36@gmail.com>
2025-04-24 19:17:28 -04:00
Justen Stall
7a316c8d51
update expected error message in install test
Signed-off-by: Justen Stall <39888103+justenstall@users.noreply.github.com>
2025-04-21 15:57:54 -04:00
Justen Stall
280a9ddbdb
Merge branch 'main' into stdlib-errors-2
Signed-off-by: Justen Stall <39888103+justenstall@users.noreply.github.com>
2025-04-21 12:13:10 -04:00
Evans Mungai
e8e79cc4b4
Merge branch 'main' into fix-take-ownership
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
2025-04-15 04:46:17 -06:00
Evans Mungai
7c37a109f2
Add install test for TakeOwnership flag
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
2025-04-15 11:24:12 +01:00
Rostyslav Polishchuk
55eb53e3a0 fix: order dependent test
TestInstallRelease_Atomic_Interrupted needs the same wait
as TestInstallRelease_Wait_Interrupted (see helm/helm#12088).

The installation goroutine started by
TestInstallRelease_Atomic_Interrupted proceeds in the background and
may interfere with other tests (see helm/helm#30610)

Also see helm/helm#12086 and helm/helm#12109 which are describe and address the root
cause.

Signed-off-by: Rostyslav Polishchuk <rostyslavp@google.com>
2025-04-10 01:32:58 +00:00
Austin Abro
386523bdbc
update to get waiter instead of set
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
2025-03-25 13:55:39 +00:00
Austin Abro
1a3fb75b34
merge
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
2025-02-27 13:56:52 +00:00
Matt Farina
e711488970
Move pkg/release to pkg/release/v1 to support v3 charts
This is part of HIP 20 which provides a means to have v3 charts
that live alongside v2 charts while having breaking changes.

The plan is to have a different release object for v3 chart
instances for at least a couple reasons:
1. So that the chart object on the release can be fundamentally
   different.
2. So that Helm v3 does not detect or try to work with instances
   of charts whose apiVersion it does not know about.

Note: it is expected that Helm v3 usage will be used long after
the Helm project no longer supports it. 5 years after Helm v2
had reached end-of-life there was still usage of it.

Note: The release util package is separate from the versioned
elements as it is planned to use generics to handle multiple
release object versions.

Signed-off-by: Matt Farina <matt.farina@suse.com>
2025-02-26 10:14:15 -05:00
Austin Abro
09faaac273
merge
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
2025-02-26 13:18:21 +00:00
Matt Farina
61d3eca55c
Move pkg/chart to pkg/chart/v2 to prepare for v3 charts
This change moves the code, updates the import locations, and
adds a doc.go file to document what the v2 package is for.

This is part of HIP 20 for v3 charts

Signed-off-by: Matt Farina <matt.farina@suse.com>
2025-02-25 15:20:44 -05:00
Austin Abro
11eeb4a6b1
merge
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
2025-02-25 14:36:29 +00:00
Scott Rigby
2cda65d444
Merge pull request #10309 from Bez625/main
Add hook annotation to output hook logs to client on error
2025-02-21 18:12:16 -05:00
Matt Farina
5c0deec327
Moving chartutil to chart/util
chartutil was originally created to operate on protobufs which are
no longer part of Helm. The util package makes more sense to be
part of the chart package.

This change is part of the HIP 20 to create v3 charts and
explicitly call out v2 charts. The changes for this are in smaller
bite size changes.

Signed-off-by: Matt Farina <matt.farina@suse.com>
2025-02-21 15:25:55 -05:00
Chris
3964f84ac8 Tidy up imports
Signed-off-by: Chris <bez625@gmail.com>
2025-02-21 12:31:07 +00:00
Chris Berry
cde407b7d1 Add hook annotations to output pod logs to client on success and fail
Signed-off-by: Chris Berry <bez625@gmail.com>
2025-02-21 12:30:29 +00:00
Austin Abro
2b03c527f1
set command line flags
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
2025-02-16 20:38:28 +00:00
Matt Farina
2236294119 Updating to helm.sh/helm/v4
Since Helm is going through breaking changes with Helm v4, the version path to
Helm needs to be updated.

Signed-off-by: Matt Farina <matt.farina@suse.com>
2024-12-26 16:33:51 -05:00
Justen Stall
6aa19b8c92
more error wrapping uses
- replace os.IsNotExist with errors.Is and fs.ErrNotExist
- use %w directive

Signed-off-by: Justen Stall <39888103+justenstall@users.noreply.github.com>
2024-11-18 12:54:09 -05:00
Nathan Baulch
ff9dd262e3
Fix typos
Signed-off-by: Nathan Baulch <nathan.baulch@gmail.com>
2024-09-14 10:29:56 +10:00
Alex Johnson
f69a2dd03e Fix race condition in TestInstallRelease_Wait_Interrupted test
Signed-off-by: Alex Johnson <hello@alex-johnson.net>
2024-06-19 07:00:41 -05:00
Matt Farina
25c473834e Enabling hide secrets on install and upgrade dry run
This change adds a new flag to the install and upgrade commands in
the Helm client and properties to the install and upgrade action.
The new flag is --hide-secret and can only be used with the
--dry-run flag.

The --dry-run flag is designed to send all chart rendered manifests to
stdout so that they can be inspected.

When the --hide-secret flag is used the Secret content is removed from
the output.

Signed-off-by: Matt Farina <matt.farina@suse.com>
2024-03-13 08:34:28 -04:00
Joe Julian
99b8f443d1
Merge pull request #11387 from zak905/fix_post_install_hook_issue
fix post install hook deletion due to before-hook-creation policy
2024-01-05 15:44:20 -08:00
Michał Słapek
169561a1b3 Fix leaking goroutines in Install
Signed-off-by: Michał Słapek <28485371+mslapek@users.noreply.github.com>
2023-09-18 20:13:47 +01:00