Commit graph

157 commits

Author SHA1 Message Date
Justen Stall
4905a61026
Merge branch 'main' into stdlib-errors-2
Signed-off-by: Justen Stall <39888103+justenstall@users.noreply.github.com>
2025-04-23 15:58:33 -04:00
Robert Sirchia
d9bc0a948c
Merge pull request #30777 from ryanhockstad/merge-fix
fix: null merge. closes #30587
2025-04-23 15:07:54 -04:00
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
Justen Stall
3877ec9049
fix golangci-lint issues
Signed-off-by: Justen Stall <39888103+justenstall@users.noreply.github.com>
2025-04-21 12:44:40 -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
Ryan Hockstad
c1175a4106 fix null merge
Signed-off-by: Ryan Hockstad <ryanhockstad@gmail.com>
2025-04-20 15:29:19 -04: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
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
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
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
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
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
0740dfc7a9
Unarchiving fix
Signed-off-by: Matt Farina <matt@mattfarina.com>
2025-04-08 17:15:01 -04:00
Benoit Tigeot
0c85456788
Leverage slog.Any for errors
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-04-07 18:26:48 +02:00
Matt Farina
ab9f0c80b5
Merge pull request #30603 from robertsirc/converting-to-slog
converting inline log to slog
2025-03-21 16:18:40 -04:00
Robert Sirchia
c5991028e0
fixing matts changes
Signed-off-by: Robert Sirchia <rsirchia@outlook.com>
2025-03-21 16:12:53 -04:00
Henrik Gerdes
597c35852a
fix: align values comments/docs to scaffold standard
Signed-off-by: Henrik Gerdes <hegerdes@outlook.de>
2025-03-11 16:47:50 +01:00
Henrik Gerdes
ca367d970c
docs: more user-friendly info for httpRoute scaffold
Co-authored-by: George Jenkins <gvjenkins@gmail.com>
Signed-off-by: Henrik Gerdes <hegerdes@outlook.de>
2025-03-11 16:47:50 +01:00
Henrik Gerdes
1aac5b0b70
fix: use common chart-example.local hostname for http-route default
Signed-off-by: Henrik Gerdes <hegerdes@outlook.de>
2025-03-11 16:47:48 +01:00
Henrik Gerdes
5d0c6e9ae4
fix: remove v1alpha2 gateway api support
Signed-off-by: Henrik Gerdes <hegerdes@outlook.de>
2025-03-11 16:47:46 +01:00
Henrik Gerdes
d22939b439
fix: correct expected number of template files in unit-test
Signed-off-by: Henrik Gerdes <hegerdes@outlook.de>
2025-03-11 16:47:44 +01:00
Henrik Gerdes
3fc5d689e6
docs: add notes in chart templates for accessing httproute
Signed-off-by: Henrik Gerdes <hegerdes@outlook.de>
2025-03-11 16:47:42 +01:00
Henrik Gerdes
90daeadeb5
feat: add httproute from gateway-api to create chart template
Adds the HTTPRoute from https://gateway-api.sigs.k8s.io/reference/spec/ to the example getting started chart.

This closes #12603

Signed-off-by: Henrik Gerdes <hegerdes@outlook.de>
2025-03-11 16:47:38 +01:00
Robert Sirchia
3a19576377
making changes as requested by matt
Signed-off-by: Robert Sirchia <rsirchia@outlook.com>
2025-03-10 15:40:10 -04:00
Robert Sirchia
2192c4e0d1
changing errors back to warns
Signed-off-by: Robert Sirchia <rsirchia@outlook.com>
2025-03-05 17:25:32 +01:00
Robert Sirchia
4422000330
fixing case issues with the logging of my errors
Signed-off-by: Robert Sirchia <rsirchia@outlook.com>
2025-03-05 17:21:29 +01:00
Robert Sirchia
848c134e0c
fixing error messages
Signed-off-by: Robert Sirchia <rsirchia@outlook.com>
2025-02-28 16:14:48 -05:00
Robert Sirchia
c2e6ed8ae5
fixing build error
Signed-off-by: Robert Sirchia <rsirchia@outlook.com>
2025-02-28 08:22:53 -05:00
Robert Sirchia
8887d01791
fixing issues with my PR
Signed-off-by: Robert Sirchia <rsirchia@outlook.com>
2025-02-27 15:47:28 -05:00
Robert Sirchia
c36bc25fb1
fixing missing attributes
Signed-off-by: Robert Sirchia <rsirchia@outlook.com>
2025-02-27 14:48:29 -05:00
Robert Sirchia
1ad79a2bb7
converting inline log to slog
Signed-off-by: Robert Sirchia <rsirchia@outlook.com>
2025-02-27 14:21:57 -05: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
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
lubingtan
91cd72d0e4 fix: improve LoadValues function documentation
Signed-off-by: lubingtan <bingtanlu@gmail.com>
2025-02-20 08:08:20 +08:00
lubingtan
fb7221bc9a fix: add doc for func MergeMaps
Signed-off-by: lubingtan <bingtanlu@gmail.com>
2025-02-20 08:08:20 +08:00
lubingtan
3d84e00ce7 fix: use Reader interface as the input of LoadValues and enhance UT of LoadValues
Signed-off-by: lubingtan <bingtanlu@gmail.com>
2025-02-20 08:08:18 +08:00
lubingtan
92087f6e33 feat: support multi-document values files for default chart values
Signed-off-by: lubingtan <bingtanlu@gmail.com>
2025-02-20 08:07:46 +08:00
Althaf M
88f7dc5329 merge: fixing merge conflicts
Signed-off-by: Althaf M althafm@outlook.com
Signed-off-by: Althaf M <althafm@outlook.com>
2025-01-22 09:32:47 +00: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
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
George Jenkins
c724175b03
Merge pull request #13343 from niladrih/more-metadata
Add annotations and dependencies to get metadata output
2024-11-19 15:22:55 -08:00
Justen Stall
63cf42a843
fix: replace "github.com/pkg/errors" with stdlib "errors" package
Signed-off-by: Justen Stall <39888103+justenstall@users.noreply.github.com>
2024-11-18 11:35:59 -05:00
Taylor Jasko
6f2f7d4781 Updating subchart load error to be more descriptive
In the event some malformed folders/files make its way into the
`charts/` directory meant for subcharts, it is possible one may see an
error message like the below:
```
Error: error unpacking foo in app: Chart.yaml file is missing
```

This error is not very descriptive, as it doesn't reference where on
disk `Chart.yaml` is missing. In the event this happens, this error is
being updated to include that `Chart.yaml` is missing for the `foo`
subchart.

Without this updated error messaging, one would need to look into Helm's
codebase to troubleshoot what exactly is wrong.

Signed-off-by: Taylor Jasko <taylor@taylorjasko.com>
2024-11-06 17:40:18 -06:00
Matt Farina
2da76a06e7
Merge pull request #13345 from AdamKorcz/fuzzzzz2
add chart fuzz tests
2024-10-04 21:47:32 +02:00
Niladri Halder
d351b091ca
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-10-04 11:22:35 +05:30