Commit graph

554 commits

Author SHA1 Message Date
George Jenkins
0bfd2cbe75
Merge pull request #31648 from hiddeco/backport-12564-to-dev-v3
Some checks failed
build-test / build (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
golangci-lint / golangci-lint (push) Has been cancelled
[v3 backport] fix(uninstall): supersede deployed releases
2025-12-26 08:21:57 -08:00
George Jenkins
526076ee3b [dev-v3] Replace deprecated NewSimpleClientset
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
2025-12-22 10:26:39 -08:00
George Jenkins
0ae8e4f2cb [dev-v3] Bump Go v1.25, golangci-lint v2
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
2025-12-21 12:35:53 -08:00
Hidde Beydals
0cd9a60723
fix(rollback): errors.Is instead of string comp
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
(cherry picked from commit d158708fbf)
2025-12-13 19:53:15 +01:00
Hidde Beydals
8bb0b37226
fix(uninstall): supersede deployed releases
This ensures that when `helm uninstall` is run with `--keep-history`
any release in a `deployed` state other than the last release (e.g.
due to a failed upgrade) is being marked as `superseded`.

As a by-effect, running `helm upgrade` on a release which has been
uninstalled after an upgrade failure now no longer works. But instead
fails with a `"<name>" has no deployed releases` error. Which is the
(likely) intended behavior, and prevents other side-effects like
rolling back to a release version which happened before the uninstall
if `--atomic` (or `--rollback-on-failure`) was provided.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
(cherry picked from commit 2f1ecc7100)
2025-12-13 19:51:20 +01:00
Luna Stadler
e5e101cced
Fix helm pull untar dir check with repo urls
The existing check worked for `helm pull downloaded-repo/chart-name`,
but often does not work when using `--repo-url`, depending on the urls
used by the charts.

Signed-off-by: Luna Stadler <luc@spreadshirt.net>
2025-10-24 00:05:45 +02:00
Feng Cao
afefca8b2d chore: update generalization warning message
Signed-off-by: Feng Cao <24779889+shfc@users.noreply.github.com>
2025-05-16 15:50:18 +09:30
Feng Cao
eb5b6d5047 fix: move warning to top of block
Emit the warning first to ensure it's always logged. This clarifies that any following errors are due to using a local chart instead of a remote repository.

Signed-off-by: Feng Cao <24779889+shfc@users.noreply.github.com>
2025-05-13 17:51:49 +09:30
Feng Cao
6b5c94475d fix: replace fmt warning with slog
Signed-off-by: Feng Cao <24779889+shfc@users.noreply.github.com>
2025-05-11 02:46:50 +09:30
Feng Cao
247bf7c2e0 fix: add warning when ignore repo flag
Signed-off-by: Feng Cao <24779889+shfc@users.noreply.github.com>
2025-05-11 01:48:39 +09:30
George Jenkins
a69eaf6098
Merge pull request #30764 from nvanthao/backport-30673
v3 backport: Process all hook deletions on failure
2025-05-06 10:57:16 -07:00
Evans Mungai
0906fe7f6b
Add install test for TakeOwnership flag
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
2025-04-17 18:19:27 +01:00
Patrick Seidensal
4ee3a19e9a
Fix --take-ownership
If a resource exists in the cluster and is to be adopted by helm install
--take-ownership, it is left unchanged while helm reports the
installation to have succeeded.

This is due to CRs and CRDs being merged without three-way-merge, which
results in an empty patch.

By using a three-way-merge transparently when --take-ownership is used,
the helm behaves as expected without breaking previous behavior.

Fixes #30622

Signed-off-by: Patrick Seidensal <pseidensal@suse.com>
2025-04-17 17:55:06 +01:00
Gerard Nguyen
0a800e84b0 backport #30673 to dev-v3
Signed-off-by: Gerard Nguyen <gerard@replicated.com>
2025-04-17 10:11:10 +10:00
Terry Howe
c188441757 chore(oci): upgrade to ORAS v2
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
2025-03-14 08:46:18 -06:00
Scott Rigby
bcb83e465f
Fix cherry-pick helm.sh/helm/v4 -> helm.sh/helm/v3
Signed-off-by: Scott Rigby <scott@r6by.com>
2025-02-21 19:19:39 -05:00
Chris Berry
2aa90b8f26
Refactor based on review comment
Signed-off-by: Chris Berry <bez625@gmail.com>
2025-02-21 19:00:41 -05:00
Chris Berry
5739197faa
Refactor based on review comment
Signed-off-by: Chris Berry <bez625@gmail.com>
2025-02-21 19:00:41 -05:00
Chris Berry
b8e13878fc
Add HookOutputFunc and generic yaml unmarshaller
Signed-off-by: Chris Berry <bez625@gmail.com>
2025-02-21 19:00:41 -05:00
Scott Rigby
97b0e11871
clarify fix error message
Signed-off-by: Scott Rigby <scott@r6by.com>
2025-02-21 19:00:41 -05:00
Scott Rigby
2f79afb0a3
fix err check
Co-authored-by: George Jenkins <gvjenkins@gmail.com>
Signed-off-by: Scott Rigby <scott@r6by.com>
2025-02-21 19:00:40 -05:00
Scott Rigby
c77f4ec6c4
remove comments about previous functionality
Signed-off-by: Scott Rigby <scott@r6by.com>
2025-02-21 19:00:40 -05:00
Scott Rigby
3cd6afe845
add short circuit return
Co-authored-by: George Jenkins <gvjenkins@gmail.com>
Signed-off-by: Scott Rigby <scott@r6by.com>
2025-02-21 19:00:40 -05:00
Chris Berry
5367001f4f
Update based on review comments
Signed-off-by: Chris Berry <bez625@gmail.com>
2025-02-21 19:00:40 -05:00
Chris Berry
3c445158d8
Update based on review comments
Signed-off-by: Chris Berry <bez625@gmail.com>
2025-02-21 19:00:39 -05:00
Chris Berry
4cb639ed4e
Fix lint
Signed-off-by: Chris Berry <bez625@gmail.com>
2025-02-21 18:55:47 -05:00
Chris
20f859c9ff
Tidy up imports
Signed-off-by: Chris <bez625@gmail.com>
2025-02-21 18:55:33 -05:00
Chris Berry
ca90972b3d
Add hook annotations to output pod logs to client on success and fail
Signed-off-by: Chris Berry <bez625@gmail.com>
2025-02-21 18:54:56 -05:00
Matt Farina
9ade3b502a
Merge pull request #13574 from gjenkins8/v3_13343
Add annotations and dependencies to get metadata output [v3 backport]
2024-12-30 15:06:08 +01:00
Matt Farina
9f620b857a Update to Go 1.23
Multiple changes were made to pass linting. Some Go built-in names
are being used for variables (e.g., min). This happens in the Go
source itself including the Go standard library and is not always
a bad practice.

To handle allowing some built-in names to be used the linter config
is updated to allow (via opt-in) some names to pass. This allows us
to still check for re-use of Go built-in names and opt-in to any
new uses.

There were also several cases where a value was checked for nil
before checking its length when this is already handled by len()
or the types default value. These were cleaned up.

The license validation was updated because it was checking everything
in the .git directory including all remote content that was local.
The previous vendor directory was from a time prior to Go modules
when Helm handled dependencies differently. It was no longer needed.

Signed-off-by: Matt Farina <matt.farina@suse.com>
(cherry picked from commit 5727f56a96)
2024-12-28 12:06:27 -05:00
Niladri Halder
7321579092 Add annotations and dependencies to get metadata output
The output of helm get metadata includes a subset of the fields contained in
the chart.Metadata struct. This change adds the values of the annotations field
and the dependencies field to the output.

Signed-off-by: Niladri Halder <niladri.halder26@gmail.com>
2024-12-27 08:11:15 -08:00
Matt Farina
41b6273682
Merge pull request #13483 from banjoh/em/password-to-oci-registries-v3
fix(helm): pass down username/password CLI parameters to OCI registry clients (v3 backport)
2024-11-27 16:06:27 +01:00
Evans Mungai
7a22dd28d1
Rename CAFile to CaFile for consistency
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
2024-11-19 21:18:27 +00:00
Suleiman Dibirov
f4f4a6b81f fix(hooks): correct hooks delete order
Signed-off-by: Suleiman Dibirov <idsulik@gmail.com>
2024-10-30 18:49:01 +02:00
wangjingcun
de9e138ec1 chore: fix some function names in comment
Signed-off-by: wangjingcun <wangjingcun@aliyun.com>
2024-10-24 18:26:22 +08:00
Evans Mungai
323f88950a
Merge remote-tracking branch 'origin/main' into em/password-to-oci-registries 2024-10-22 17:54:10 +01:00
Nathan Baulch
ef85fa7f2d
Grammar fixes
Signed-off-by: Nathan Baulch <nathan.baulch@gmail.com>
2024-09-14 10:30:31 +10:00
Nathan Baulch
ff9dd262e3
Fix typos
Signed-off-by: Nathan Baulch <nathan.baulch@gmail.com>
2024-09-14 10:29:56 +10:00
Scott Rigby
8a26add23f
Fix linting error for pr 12876
golangci-lint passed when last commit was made on #12876, but has since failed.
This is probably because the linter has since updated.

I ran locally with the same version of golangci-lint we run in GH Actions, and
this is the only error now (an additional linting error in
pkg/action/package.go since #12876 has already been fixed.

```sh
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.58.1

./bin/golangci-lint run pkg/action/...

./bin/golangci-lint run ./...
```

we should be good now.

Signed-off-by: Scott Rigby <scott@r6by.com>
2024-08-14 16:34:27 -04:00
Matt Farina
c261d0655c
Merge pull request #12876 from manno/sdk-ignore-missing-annotations
Allow install, update action to adopt existing resources (sdk only)
2024-08-14 15:56:37 -04:00
Scott Rigby
f0442777bb
Merge pull request #12743 from anessi/feat/skip-schema-validation
feat(helm): add --skip-schema-validation flag to helm 'install', 'uprade' and 'lint'
2024-08-12 14:28:52 -04:00
Evans Mungai
0687961da4
Revert CAFile rename breaking change
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
2024-08-02 16:57:09 +01:00
Joe Julian
4278ada158
Merge pull request #13085 from alex-kattathra-johnson/issue-12961
Fix race condition in TestInstallRelease_Wait_Interrupted test
2024-07-08 16:47:35 -07:00
Joe Julian
15e36139c1
Merge pull request #13130 from idsulik/issue-13127
fix: update error handling in Configuration.Init method, add tests for the method
2024-07-08 16:38:34 -07:00
Joe Julian
cda2c4f802
Merge pull request #12924 from porridge/drop-apis
Drop unused field.
2024-07-08 16:35:36 -07:00
anessi
acf7158565
feat(helm): add --skip-schema-validation flag to helm 'install', 'upgrade' and 'lint'
When --skip-schema-validation is set, any schema contain in the helm chart is ignored. Defaults to 'false'.

Closes #10398

Signed-off-by: anessi <16045045+anessi@users.noreply.github.com>
2024-06-25 16:43:48 +02:00
Evans Mungai
12d8d28534
Add username/password to package subcommand
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
2024-06-19 18:37:31 +01:00
Evans Mungai
837ae4242c
Add username/password to dependency build/update subcommands
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
2024-06-19 16:37:44 +01: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
Suleiman Dibirov
800c33a5aa fix: update error handling in Configuration.Init method, add tests for the method
Signed-off-by: Suleiman Dibirov <idsulik@gmail.com>
2024-06-19 07:46:38 +03:00