Commit graph

2024 commits

Author SHA1 Message Date
George Jenkins
5926ec83dd Remove SetupPluginEnv
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
2025-09-01 10:49:01 -07:00
Matt Farina
f0cf9c28f0
Move logging setup to be configurable
Signed-off-by: Matt Farina <matt.farina@suse.com>
2025-07-01 15:51:25 -04:00
Jesse Simpson
098486d221
fix: remove duplicate error message
closes #30857

There are 2 ways the error message from any subcommand is printed:
1. through the debug log line that this PR removes
2. through the spf13/cobra package before the error type is returned to
   the caller.

Since the spf13/cobra package already prints out the error, there is no
use in redundantly printing out the error again within the debug log
line.

Signed-off-by: Jesse Simpson <jesse.simpson36@gmail.com>
2025-05-15 20:38:11 -04:00
Benoit Tigeot
7f02e89a7a
No longer log call location using flag, it will need to be done in slog
Some ideas here: https://www.reddit.com/r/golang/comments/15nwnkl/achieve_lshortfile_with_slog/

Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-04-10 16:13:32 +02:00
Benoit Tigeot
cbaac7652d
Call slog directly instead of using a wrapper
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-04-10 15:35:36 +02:00
Benoit Tigeot
710770eed4
Linting
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-04-07 17:49:03 +02:00
Benoit Tigeot
3e4e78378e
Go the slog way
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-04-07 17:49:03 +02:00
Benoit Tigeot
6ce967391d
Trick slog to return the full error
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-04-07 17:49:03 +02:00
Benoit Tigeot
b2380720eb
Migrate to pure slog without a custom wrapper
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-04-07 16:46:08 +02:00
Benoit Tigeot
b42767be40
Migrate more code to log adapter
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-04-07 15:36:52 +02:00
Benoit Tigeot
83cdffe4ae
Migrate to a dedicated internal package for slog adapter + migrate more
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-04-07 15:36:36 +02:00
Austin Abro
022d4db6af
move logic from cmd/helm to pkg/cmd
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
2025-03-03 18:43:03 +00:00
Austin Abro
20c75f0c10
fix namespace assignment not passing through
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
2025-03-03 17:26:21 +00:00
Austin Abro
d3814d786b
merge
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
2025-02-27 13:55:49 +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
Yarden Shoham
0d5e64c1f2 Fix formatting
Signed-off-by: Yarden Shoham <git@yardenshoham.com>
2025-02-25 22:34:50 +02:00
Yarden Shoham
79dadc6fe4 Merge branch 'main' into post-renderer-once 2025-02-25 22:33:45 +02: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
Matt Farina
18ca7c1002
Move pkg/releaseutil to pkg/release/util
The releaseutil package was originally designed to work against a
generated codebase from a protobuf in Helm v2. This is when Helm
used gRPC to communicate to a server side component named Tiller.
When Helm moved everything client side, this package remained and
it supported the release package.

This change moves releaseutil to be a sub-packge of release. This
is part of the change to support apiVersion v3 charts which is
documented in HIP 20

Signed-off-by: Matt Farina <matt.farina@suse.com>
2025-02-24 14:58:51 -05:00
Austin Abro
297f7b9acb
squash
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
2025-02-24 15:11:54 +00:00
Yarden Shoham
dd728861a9 Fix tests
Signed-off-by: Yarden Shoham <git@yardenshoham.com>
2025-02-24 07:24:15 +02:00
Yarden Shoham
326fdc3e5f
Apply suggestions from code review
Co-authored-by: George Jenkins <gvjenkins@gmail.com>
Signed-off-by: Yarden Shoham <git@yardenshoham.com>
2025-02-24 07:23:18 +02:00
Yarden Shoham
9e17871afb fix: error when more than one post-renderer is specified
We now make sure the post-renderer flag can be passed at most once instead of silently taking the last one passed.

Example:

```bash
$ helm template test ...  --post-renderer=true --post-renderer=cat
Error: invalid argument "cat" for "--post-renderer" flag: cannot set post-renderer more than once, given: cat, previous: true
```

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
2025-02-22 14:25:26 +02: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 Berry
e5bc21c56b Refactor based on review comment
Signed-off-by: Chris Berry <bez625@gmail.com>
2025-02-21 16:33:31 +00:00
Chris Berry
9791767baa Refactor based on review comment
Signed-off-by: Chris Berry <bez625@gmail.com>
2025-02-21 16:16:26 +00:00
Matt Farina
2603390c2e
Merge pull request #30470 from gjenkins8/cleanup_repotest_server
Cleanup `repotest.Server` constructors
2025-02-19 15:10:37 -05:00
Robert Sirchia
53a4e18209
Merge pull request #30550 from mattfarina/update-cobra-cmd-output
Moving to SetOut and SetErr for Cobra
2025-02-19 15:07:47 -05:00
Robert Sirchia
9408978517
Merge pull request #30294 from Zhanweelee/supports-json-arguments
Supports json arguments
2025-02-19 15:04:05 -05:00
Matt Farina
b689ff203e
Moving to SetOut and SetErr for Cobra
SetOutput is deprecated. This causes it to fail linting.

Signed-off-by: Matt Farina <matt@mattfarina.com>
2025-02-19 14:58:10 -05:00
Scott Rigby
dea2069374
Merge pull request #13481 from banjoh/em/add-cpu-memory-profiling-flags
feat: Enable CPU and memory profiling
2025-02-18 14:48:29 -05:00
Evans Mungai
62576db2fc
chore: use []error instead of []string
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
2025-02-17 18:36:04 +00:00
Evans Mungai
fdf4484971
Update cmd/helm/profiling.go
Co-authored-by: George Jenkins <gvjenkins@gmail.com>
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
2025-02-17 18:31:17 +00:00
George Jenkins
234d171da5 Cleanup repotest Server constructors
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
2025-02-08 18:51:37 -08:00
Zhanwei Li
274d43c10d feat: Enhance JSON value parsing in Helm CLI
- Add support for parsing full JSON objects with `--set-json`
- Update documentation to clarify JSON value input formats
- Improve test coverage for value parsing scenarios
- Modify `MergeValues` to handle both key=value and JSON object formats

Signed-off-by: Zhanwei Li <zhanweelee@gmail.com>
2025-02-08 10:04:14 +08:00
George Jenkins
3253059438
Merge pull request #13535 from helm/refactor_tlsutil
refactor: tlsutil use options pattern
2025-02-05 13:23:50 -08:00
Terry Howe
5a7046b9bf chore(oci): upgrade to ORAS v2
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
Co-authored-by: Zoran Regvart <zoran@regvart.com>
2025-02-02 07:28:41 -07:00
Evans Mungai
33aa8b5397
Prefer environment variables to CLI flags
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
2025-01-27 13:30:08 +00:00
Robert Sirchia
963d680ae9
Merge pull request #13533 from althmoha/#12987
fix: (toToml) renders int as float
2025-01-24 15:16:59 -05:00
George Jenkins
415c7e10fd
Merge pull request #13516 from TerryHowe/new-lint
chore: fix problems with latest lint
2025-01-23 18:30:23 -08:00
Althaf M
10d267ed8b fix: (toToml) renders int as float
This commit fixes the issue where the yaml.Unmarshaller converts all int values into float64, this passes in option to decoder,
which enables conversion of int into .
Signed-off-by: Althaf M <althafm@outlook.com>
2025-01-22 09:32:47 +00:00
George Jenkins
4aaacfcff1
Merge pull request #13494 from helm/rm_deprecated_repo_add_no_update_flag
Remove deprecated `repo add --no-update` flag
2025-01-18 08:37:14 -08:00
Robert Sirchia
a4f8afb303
Merge pull request #13602 from crystalstall/main
refactor: using slices.Contains to simplify the code
2025-01-17 16:06:00 -05:00
George Jenkins
53a4a59eb9
Merge pull request #13600 from gjenkins8/cleanup_NewShowWithConfig
cleanup: `NewShowWithConfig` -> `NewShow`
2025-01-14 12:42:54 -08:00
crystalstall
09cf0b9858 refactor: using slices.Contains to simplify the code
Signed-off-by: crystalstall <crystalruby@qq.com>
2025-01-11 00:34:05 +08:00
Matt Farina
090d3e9579
Merge pull request #13611 from mattfarina/version-v4
Updating the internal version to v4
2025-01-07 18:07:27 +01:00
George Jenkins
5d13b0cac3
Merge pull request #13577 from gjenkins8/gjenkins/rm_pull_with_opts
refactor: Remove redundant `NewPullWithOpts`
2025-01-07 08:37:00 -08:00
Matt Farina
27bcda42dd
Updating the internal version to v4
Signed-off-by: Matt Farina <matt.farina@suse.com>
2025-01-07 11:32:44 -05:00
George Jenkins
8468de42ed cleanup: NewShowWithConfig -> NewShow
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
2025-01-05 10:16:31 -08:00