Commit graph

3113 commits

Author SHA1 Message Date
Daniel Strobusch
b183eccfc4
copy dependency metadata on aliasing to avoid sharing imported values
imported values are stored in dependency objects, which breaks if a chart dependency is shared among multiple aliases.
By copying the dependency objects in the metadata values can be imported correctly.

Supersedes #10174

Signed-off-by: Daniel Strobusch <1847260+dastrobu@users.noreply.github.com>
2025-04-23 11:32:45 +02:00
Daniel Strobusch
df7befd208
copy dependencies on aliasing to avoid sharing chart references on multiply aliased dependencies
Dependencies keep a reference on their parent chart, which breaks if a chart reference is shared among multiple aliases.
By copying the dependencies, parent information can be set correctly to render the templates as expected later on.

Note that this change will make ChartFullPath return a different path for sub-subcharts. It will contain the alias names instead of the path to the chart files which makes it consistent with paths to templates on the subchart level.

Closes #9150

Signed-off-by: Daniel Strobusch <1847260+dastrobu@users.noreply.github.com>
2025-04-23 11:16:05 +02:00
Matthieu MOREL
d3eeb2c942 chore: remove github.com/hashicorp/go-multierror dependency
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-04-21 19:27:15 +02:00
Scott Rigby
eb6e240cfe
Merge pull request #30734 from ipaqsa/feature/add-custom-template-funcs
feat(pkg/engine): add support for custom template funcs
2025-04-21 11:13:12 -04:00
Scott Rigby
8255300280
Merge pull request #12382 from edbmiller/ed-dot-miller/parse-chartfile-yaml-strictly
fix(pkg/lint): unmarshals Chart.yaml strictly
2025-04-20 15:35:51 -04:00
Edward Miller
e414695a5b fix
Signed-off-by: Edward Miller <edmiller287@gmail.com>
2025-04-19 13:41:43 +01:00
Benoit Tigeot
e2461de3c2
Fix test with toml bump
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-04-19 00:48:23 +02:00
Matt Farina
a842140ef6
Merge pull request #13578 from gjenkins8/rm_chart_repo_load_func
refactor: Remove ChartRepository `[]ChartPaths`
2025-04-18 20:43:52 +01:00
Edward Miller
629780a34a fix: reapply error message fix
Signed-off-by: Edward Miller <edmiller287@gmail.com>
2025-04-18 19:18:55 +01:00
Edward Miller
9d43f70643 Update error message
Co-authored-by: Andrew Block <andy.block@gmail.com>
Signed-off-by: Edward Miller <55854159+edbmiller@users.noreply.github.com>
2025-04-18 19:13:40 +01:00
Edward Miller
14a468f24d Add chartutil.StrictLoadChartfile for strict (WARNING-level) lint
Signed-off-by: Edward Miller <edmiller287@gmail.com>
2025-04-18 19:13:40 +01:00
Edward Miller
00f8561ad4 fix(pkg/lint): unmarshals Chart.yaml strictly
When "helm lint" is run, it now errors on invalid chartfiles,
e.g. those with duplicate keys

Closes #12381

Signed-off-by: Edward Miller <edmiller287@gmail.com>
2025-04-18 19:13:40 +01:00
wangcundashang
7bb0c85441 chore: fix function name in comment
Signed-off-by: wangcundashang <wangcundashang@qq.com>
2025-04-18 19:11:41 +08:00
Stepan Paksashvili
b54349d9b2 fix(pkg/engine): allow to override all functions
Signed-off-by: Stepan Paksashvili <stepan.paksashvili@flant.com>
2025-04-18 10:29:56 +03:00
Stepan Paksashvili
5c2f89307d feat(pkg/engine): and custom funcs to action config
Signed-off-by: Stepan Paksashvili <stepan.paksashvili@flant.com>
2025-04-18 10:29:56 +03:00
Stepan Paksashvili
8982b57e5e feat(pkg/engine): and custom funcs overriding test
Signed-off-by: Stepan Paksashvili <stepan.paksashvili@flant.com>
2025-04-18 10:29:56 +03:00
Stepan Paksashvili
9073bcf53e feat(pkg/engine): add support for custom template funcs
Enhances the template engine and action config to allow users to inject custom template functions via an action config when using Helm as a library.

Closes #30733

Signed-off-by: Stepan Paksashvili <stepan.paksashvili@flant.com>
2025-04-18 10:29:56 +03:00
Scott Rigby
599fad1864
Merge pull request #30697 from p-se/fix-take-ownership
Fix --take-ownership for custom resources - closes #30622
2025-04-17 11:54:11 -04:00
Evans Mungai
1f5605a405
fix formatting errors
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
2025-04-17 15:33:21 +01:00
Benoit Tigeot
d33e2896f0
Prevent failures with method signatures on hooks
changes on wait strategy. This PR try to fix linting and tests.

Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-04-17 12:37:37 +02:00
Scott Rigby
e397f44840
Merge pull request #30673 from nvanthao/process-all-hook-deletions-on-failure
fix: Process all hook deletions on failure
2025-04-16 17:21:28 -04:00
Matt Farina
01590a59b2
Merge pull request #30760 from robertsirc/add-debuging-to-jsonschema
adding slog debug to a few points
2025-04-16 21:10:22 +01:00
Robert Sirchia
8733103743
Merge pull request #30718 from klihub/fixes/package/multiple-charts-single-passwd-from-stdin
Allow signing multiple charts with a single passphrase from stdin.
2025-04-16 16:07:44 -04:00
Robert Sirchia
da096e1b7a
Merge pull request #30752 from benoittgt/bump-golangci-lint-action
Bump golangci lint to last major version and fix static-check errors
2025-04-16 15:50:55 -04:00
Robert Sirchia
ef0361de21
fixing as per review
Signed-off-by: Robert Sirchia <rsirchia@outlook.com>
2025-04-16 15:26:44 -04:00
Robert Sirchia
9b9ff12c6d
adding slog debug to a few points
Signed-off-by: Robert Sirchia <rsirchia@outlook.com>
2025-04-16 11:36:05 -04:00
Krisztian Litkey
3102c28804
fix: allow signing multiple charts with passphrase from stdin.
Cache the signing key passphrase. When signing multiple charts
with the passphrase from stdin, this allows signing all charts
instead of all but the first failing with an error about stdin
already having been closed.

Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
2025-04-16 18:05:36 +03: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
Matt Farina
0dffc580b0
Simpligy the JSON Schema checking
A new library was introduced that provides JSON Schema checking for
newer versions of the schema. In Helm v4, there is no need to have
two packages doing the JSON schema validation. The message output
can have breaking changes.

This change moves everything to the newer library. It also uses a
wrapper error to enable a clean Helm only interface for the
public Go API validation functions. This would enable the replacement
of the Schema validation library, if needed, without breaking the
Go API contract.

Signed-off-by: Matt Farina <matt.farina@suse.com>
2025-04-14 19:32:01 -04:00
Matt Farina
55a4fc121b
Merge pull request #13283 from win-t/jsonschema
adding support for JSON Schema 2020
2025-04-14 19:52:03 +01:00
Benoit Tigeot
a1c2f47c08
avoid using reflect.DeepEqual with errors
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-04-14 11:11:37 +02:00
Benoit Tigeot
eb65ce280b
could apply De Morgan's law
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-04-14 11:11:37 +02:00
Benoit Tigeot
374805deb4
error strings should not be capitalized
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-04-14 11:11:37 +02:00
Benoit Tigeot
1654664b78
could use strings.ReplaceAll instead
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-04-14 10:51:26 +02:00
Benoit Tigeot
a6d0335bbb
Use fmt.Fprintf(...) instead of ...
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-04-14 10:49:49 +02:00
Benoit Tigeot
a9b7732367
could remove embedded field X from selector
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-04-14 10:43:48 +02:00
Kurnia D Win
6c54351c01 Merge remote-tracking branch 'upstream/main' into jsonschema 2025-04-13 13:38:25 +07:00
Benoit Tigeot
f5aec508f5
Add detailed debug logging for resource readiness states
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-04-12 09:58:56 +02:00
Scott Rigby
9a670ae920
Merge pull request #30701 from zanuka/30617-request-for-helm-install-order-doc-update
updates mutate and validate web hook configs
2025-04-11 16:56:39 -04:00
Scott Rigby
0cecd910e5
Merge pull request #30713 from gjenkins8/gjenkins/rm_helmv2_template_lint_rules
cleanup: Remove Helm v2 template lint rules
2025-04-11 16:35:52 -04:00
Matt Farina
a536832714
Merge pull request #30749 from mattfarina/fix-alpine-chart
Removing the alpine test chart
2025-04-11 21:07:41 +01:00
Robert Sirchia
f5decfc28d
Merge pull request #30737 from rpolishchuk/investigation-pr-30610
fix: order dependent test
2025-04-11 16:06:45 -04:00
Matt Farina
91ecb56355
Removing the alpine test chart
A .gitignore was previously setup to ignore this file. When pkg/cmd
was setup the .gitignore was not updated. The change adds the new
location to continue to ignore this file.

Note, the previous location is still included in the .gitignore
because developers will have a file there and we do not want that
accidently included in a commit.

Signed-off-by: Matt Farina <matt.farina@suse.com>
2025-04-11 16:01:49 -04:00
Matt Farina
7a1eb77e77
Merge pull request #30708 from benoittgt/migrate-kube-pkg-to-slog
Migrate pkg to slog
2025-04-11 20:50:34 +01:00
Matt Farina
ed005f5c32
Removing deprecation notice for this function.
While the constructor is not used by Helm itself, it is used by SDK
users and there is currently no alternative way to expose this.

Signed-off-by: Matt Farina <matt.farina@suse.com>
2025-04-10 13:45:02 -04:00
Matt Farina
7938662f95
Remove ValidName regex
This regex was already deprecated.

Validation happens inside the Metadata Validate function for the
name instead of using this regex.

Signed-off-by: Matt Farina <matt.farina@suse.com>
2025-04-10 13:30:48 -04:00
Benoit Tigeot
68440d7b29
Prefer using slog.Any when displaying errors
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-04-10 17:40:28 +02:00
Benoit Tigeot
c05bcbd498
Fix nil pointer dereference in ready test
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-04-10 16:40:05 +02:00
Benoit Tigeot
e7eedae97c
Use the logger with proper handling of dynamic debug on 2 locations
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-04-10 16:02:05 +02:00