Commit Graph

85 Commits

Author SHA1 Message Date
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
build-test / build (push) Waiting to run Details
CodeQL / Analyze (go) (push) Waiting to run Details
golangci-lint / golangci-lint (push) Waiting to run Details
release / release (push) Waiting to run Details
release / canary-release (push) Waiting to run Details
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run Details
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
Joe Julian 4ff7d90872
Merge remote-tracking branch 'upstream/main' into add-labels-to-install-upgrade 2023-08-23 10:42:16 -07:00
Dmitry Chepurovskiy 7b13ac9914
Added error in case try to supply custom label with name of system label during install/upgrade
Signed-off-by: Dmitry Chepurovskiy <me@dm3ch.net>
2023-07-25 17:55:05 +03:00
Tapas Kapadia 4b7248e361 feat(helm): add ability for --dry-run to do lookup functions
When a helm command is run with the --dry-run flag, it will try to connect to the cluster
if the value is 'server' to be able to render lookup functions.
Closes helm#8137

Signed-off-by: Tapas Kapadia <tapaskapadia10@gmail.com>
2023-04-08 18:43:01 -05:00
Matt Farina 4e7e939f19
Updating the Go version in go.mod
At this time both Go 1.19 and 1.20 are supported. The version
specified in the go.mod file is the minimum version we expect Helm
to be compiled against. This is the oldest supported version to
support environments where others compile Helm. The Helm project
is using Go 1.20 to build Helm itself.

Updating to Go 1.19 also includes dealing with io/ioutil
deprecation and some additional linting issues around staticcheck.
All the staticcheck issues were in test files so linting was
skipped for those.

Signed-off-by: Matt Farina <matt.farina@suse.com>
2023-03-22 11:52:30 -04:00
zak905 fa025fc28b fix post install hook deletion due to before-hook-creation policy
Signed-off-by: zak905 <zakaria.amine88@gmail.com>
2023-02-09 21:46:05 +01:00
Tapas Kapadia ddb33580db feat(helm): add ability for a dry-run to evaluate lookup functions
When a helm command is run with the --dry-run-option=server flag, it will try to connect to the cluster
to be able to render lookup functions.
Closes #8137

Signed-off-by: Tapas Kapadia <tapaskapadia10@gmail.com>
2023-01-23 13:18:59 -06:00
Tapas Kapadia 51281c195a feat(helm): add ability for --dry-run to do lookup functions
When a helm command is run with the --dry-run flag, it will try to connect to the cluster
if the value is 'server' to be able to render lookup functions.
Closes helm#8137

Signed-off-by: Tapas Kapadia <tapaskapadia10@gmail.com>
2023-01-16 12:43:15 -06:00
Tapas Kapadia 92a6640f8a feat(helm): add ability for --dry-run to do lookup functions
When a helm command is run with the --dry-run flag, it will try to connect to the cluster
to be able to render lookup functions.
Closes #8137

Signed-off-by: Tapas Kapadia <tapaskapadia10@gmail.com>
2023-01-16 12:43:15 -06:00
Dmitry Chepurovskiy f1700e86d1
Added unit tests for implemented install/upgrade labels logic
Signed-off-by: Dmitry Chepurovskiy <dm3ch@dm3ch.net>
Signed-off-by: Dmitry Chepurovskiy <me@dm3ch.net>
2022-06-17 21:36:41 +03:00
Eng Zer Jun 2e3e22a003
test: use `T.TempDir` to create temporary test directory
The directory created by `T.TempDir` is automatically removed when the
test and all its subtests complete.

Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-02-12 13:54:54 +08:00