Benoit Tigeot
05d86c28d8
Merge 317882af36 into 0752c1f5b5
2 weeks ago
George Jenkins
19b3656306
Bump to version v4.2 ( #32102 )
...
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
2 weeks ago
Matheus Pimenta
a4a9cc7a31
Upgrade Go to 1.26, Kubernetes to 1.36, kstatus to 1.1
...
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
4 weeks ago
George Jenkins
4bd9e90aa0
Merge pull request #30811 from mmorel-35/testifylint
...
chore: fix bool-compare issues from testifylint
4 weeks ago
Evans Mungai
a8e249714f
Update pkg/chart/common/util/coalesce.go
...
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
1 month ago
Johannes Lohmer
52fc971da3
test(values): Add test for nil cleanup in partially overridden subchart maps
...
Signed-off-by: Johannes Lohmer <jojo.dev@lohmer.com>
1 month ago
Johannes Lohmer
00638773d1
fix(values): do not copy chart-default nils into coalesced values
...
Only user-supplied nils should survive coalescing. Chart-default nils
defaults, not just user overrides. This caused:
- %!s(<nil>) in templates using Bitnami common.secrets.key (#31919 )
- pluck fallbacks returning nil instead of falling through to globals
(#31971 )
Fixes #31919
Fixes #31971
Signed-off-by: Johannes Lohmer <jojo.dev@lohmer.com>
1 month ago
Johannes Lohmer
5cb4e7d992
test(values): add tests for subchart nil value regressions
...
Three test cases that cover the regression scenarios introduced
by the #31644 nil preservation fix:
- subchart default nils should be cleaned up
when parent doesn't set those keys (#31919 )
- user-supplied null should erase subchart defaults (#31919 )
- subchart default nil should not shadow global values via pluck (#31971 )
Tests are expected to fail until the regression is fixed.
Signed-off-by: Johannes Lohmer <jojo.dev@lohmer.com>
1 month ago
Benoit Tigeot
317882af36
fix(loader): rename max param to avoid shadowing built-in
...
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
1 month ago
Benoit Tigeot
378311fd38
fix(loader): export BudgetedReader for cross-package use
...
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
1 month ago
Benoit Tigeot
868e210145
refactor(loader): make read budget configurable
...
Follow recommendations from https://github.com/helm/helm/pull/31748#discussion_r3058581419
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
1 month ago
Benoit Tigeot
0a59858527
fix: cap directory budget reads with LimitReader
...
Use `os.Open` + `io.LimitReader` instead of `os.ReadFile` in
`ReadFileWithBudget` so a file that grows between stat and read
cannot allocate unbounded memory.
Also fix `MaxDecompressedFileSize` doc comment to reflect it is
unused/deprecated, add nil guard on remaining, and check
`os.Stat` errors in tests.
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
1 month ago
George Jenkins
f7c4d75574
Merge commit from fork
...
fix: Chart dot-name path bug
1 month ago
Anmol Virdi
de58531ca7
Minor nit: fix import instructions to comply with canonical import paths
...
Signed-off-by: Anmol Virdi <anmolvirdi2000@gmail.com>
1 month ago
Benoit Tigeot
bb213c06af
fix: enforce aggregate size budget on directory loading
...
Directory-based chart loading (`LoadDir`) used unbounded `os.ReadFile`
calls with no total size check. Archive loading already enforces
`MaxDecompressedChartSize` via a remaining-byte budget but directory
loading did not, leaving local charts and `file://` dependencies as
an unbounded memory path.
Add `ReadFileWithBudget` in the archive package and use it in both
v2 and v3 directory loaders so they track the same aggregate budget.
Ref: https://github.com/helm/helm/pull/31748#issuecomment-4138927643
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2 months ago
Benoit Tigeot
0ee6c7bc9d
fix: deprecate MaxDecompressedFileSize instead of removing
...
As Matt suggested we should keep the variable until v5 as it can be used
because it is public.
Related:
- https://github.com/helm/helm/pull/31748#discussion_r2738518696
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2 months ago
Benoit Tigeot
60294548e0
refactor: remove per-file decompression size limit
...
Remove MaxDecompressedFileSize as it's no longer necessary after
migrating to a maintained JSON schema library (santhosh-tekuri/jsonschema/v6).
The original limit was added to protect against vulnerabilities in an
unmaintained library.
The total decompressed chart size limit (MaxDecompressedChartSize) remains
to protect against other attack vectors.
Partially resolves #30738
Related:
- https://github.com/helm/helm/pull/30743
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2 months ago
Matthieu MOREL
7edfff33eb
chore: fix unnecessary-format issues from revive
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2 months ago
Matthieu MOREL
071558d69f
chore: fix bool-compare issues from testifylint
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2 months ago
George Jenkins
e3b4808450
Merge pull request #31874 from mmorel-35/perfsprint-pkg-4-fb6db58
...
chore(pkg): fix perfsprint linter issues part 4
2 months ago
George Jenkins
610547b570
Merge pull request #31873 from mmorel-35/perfsprint-pkg-5-3294250
...
chore(pkg): fix perfsprint linter issues part 5
2 months ago
George Jenkins
60184996e5
fix: Chart dot-name path bug
...
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
2 months ago
George Jenkins
df8e0301ed
Merge pull request #31878 from mmorel-35/perfsprint-pkg-3-39f7a9f
...
chore(pkg): fix perfsprint linter issues part 3
3 months ago
Matthieu MOREL
1d2d63cc43
chore(pkg): enable perfsprint linter
...
#### Description
enable perfsprint linter in pkg/cmd
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
3 months ago
Matthieu MOREL
63f03c0f5c
chore(pkg): enable perfsprint linter
...
#### Description
enable perfsprint linter in pkg/action
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
3 months ago
Matthieu MOREL
c25c988cfb
chore(pkg): enable perfsprint linter
...
#### Description
enable perfsprint linter in pkg/registry
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
3 months ago
Mads Jensen
36cb3a2fe9
Replace unneeded use of t.Fatalf with t.Fatal
...
Signed-off-by: Mads Jensen <atombrella@users.noreply.github.com>
3 months ago
Matthieu MOREL
5b6c6bbfc7
fix: enable nolinlint linter
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
3 months ago
George Jenkins
be7cdb69e5
Merge pull request #31806 from mmorel-35/errorlint-pkg-4-15f432a
...
fix(pkg): errorlint linter
3 months ago
George Jenkins
92b64e87ad
chore: fixes
...
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
3 months ago
Evans Mungai
ee018608f6
fix: handle OCI digest algorithm prefix in chart downloader ( #31601 )
...
* fix: strip digest algorithm prefix before hex decoding
OCI references with tag+digest (e.g., chart:1.0@sha256:abc...) failed with "invalid byte" error because the sha256: prefix was passed to hex.DecodeString().
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
* Add cmd test for OCI references with tag+digest
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
* Move oci registry push result to a struct
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
* Review comments from PR review
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
* Fix failing test
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
---------
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
3 months ago
Matt Farina
794372e317
Merge pull request #31816 from mmorel-35/errorlint-pkg-7-6d6a660
...
fix(pkg): errorlint linter
3 months ago
Joe Julian
947b429cdd
Merge pull request #31801 from mmorel-35/modernize-pkg-4-062b248
...
chore(pkg): fix modernize linter
3 months ago
Joe Julian
78f5af72be
Merge pull request #31802 from mmorel-35/modernize-pkg-5-a3c8fdb
...
chore(pkg): fix modernize linter
3 months ago
Joe Julian
7f9703fe22
Merge pull request #31811 from mmorel-35/errorlint-pkg-3-39f7a9f
...
fix(pkg): errorlint linter
3 months ago
Matthieu MOREL
259f76a849
fix(pkg): errorlint linter
...
errorlint linter in pkg/cmd
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
3 months ago
Matthieu MOREL
6d1490ed1e
fix(pkg): errorlint linter
...
#### Description
errorlint linter in pkg/cmd
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
3 months ago
Matthieu MOREL
4d0ae7f33a
fix(pkg): errorlint linter
...
#### Description
errorlint linter in pkg
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
3 months ago
Matthieu MOREL
4330bdea04
fix(pkg): errorlint linter
...
#### Description
errorlint linter in pkg
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
3 months ago
Matthieu MOREL
5cc2e55714
chore(pkg): fix modernize linter
...
#### Description
fix modernize linter in pkg/chart/v2/lint/rules
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
3 months ago
Matthieu MOREL
ba38159313
chore(pkg): fix modernize linter
...
#### Description
fix modernize linter in pkg/strvals
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
3 months ago
Matthieu MOREL
111d4e6e0e
chore(pkg): fix modernize linter
...
#### Description
fix modernize linter in pkg/chart/common/util
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
3 months ago
Evans Mungai
5b78ee8dff
Merge pull request #31644 from banjoh/em/fix-nil-values
...
fix(values): preserve nil values when chart default is empty map
4 months ago
Evans Mungai
0298b2ffd0
Remove refactorring changes from coalesce_test.go
...
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
4 months ago
Evans Mungai
b8937ad192
Fix import
...
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
4 months ago
Evans Mungai
a333bbaf27
Update pkg/chart/common/util/coalesce_test.go
...
Co-authored-by: George Jenkins <gvjenkins@gmail.com>
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
4 months ago
Mads Jensen
2d6d9c09c4
Replace reflect.Ptr with reflect.Pointer
...
The reflect package has a go:fix annotation for Ptr = Pointer.
Signed-off-by: Mads Jensen <atombrella@users.noreply.github.com>
5 months ago
Branch Vincent
c6d9a5bdc2
build: set kube version via `debug.BuildInfo`
...
Signed-off-by: Branch Vincent <branchevincent@gmail.com>
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
5 months ago
Mads Jensen
a490bb3c20
Use errors.Is to check for io.EOF and gzip.ErrHeader
...
In GoLang, using the == operator to check for a certain error will not
unwrap the error chain, and therefore may hide the problem.
Signed-off-by: Mads Jensen <atombrella@users.noreply.github.com>
5 months ago
Robert Sirchia
4cf7d8d025
Merge pull request #31641 from wangjingcun/main
...
chore: fix some comments to improve readability
5 months ago