Ilya Kiselev
9b457ea032
fix: normalize epoch to UTC/truncate before stamping tar modtimes
...
Tar headers have second-level granularity and store timezone-independent
Unix timestamps. Normalize SourceDateEpoch with .UTC().Truncate(time.Second)
so callers passing sub-second or non-UTC values still get deterministic output.
Also verify in the test that gzip header ModTime is zero (helm design) and
compare tar entry ModTimes with time.Equal() since tar.Reader returns local time.
Signed-off-by: Ilya Kiselev <kis-ilya-a@yandex.ru>
1 month ago
Ilya Kiselev
1df209e084
feat(package): support SOURCE_DATE_EPOCH for reproducible chart archives
...
Read SOURCE_DATE_EPOCH in the CLI layer (pkg/cmd/package.go) and pass it
to the action layer as Package.SourceDateEpoch *time.Time. Before calling
Save(), stampModTimes() overwrites every tar-entry ModTime in the chart
(including templates, files, raw values, schema and sub-charts) with the
requested epoch.
writeToTar and Save are not modified: the caller now supplies the epoch as
the modTime argument, which is how mattfarina's review (#32060 ) asked for
this to be structured.
Closes #31439
Signed-off-by: Ilya Kiselev <kis-ilya-a@yandex.ru>
1 month ago
Evans Mungai
d374e823b2
Merge pull request #32086 from mmorel-35/error-is-as
...
testifylint: enable error-is-as and error-nil rules
2 months ago
box4wangjing
432fc8a217
refactor: use slices.Backward to simplify the code
...
Signed-off-by: box4wangjing <box4wangjing@outlook.com>
2 months ago
Sebastien Tardif
922558fc1a
fix: address review feedback
...
- Close log stream after reading (prevents connection/fd leak)
- Strengthen tests to assert on output headers rather than error paths
- Remove unused import
Signed-off-by: Sebastien Tardif <SebTardif@ncf.ca>
2 months ago
Sebastien Tardif
854f7f6b72
fix: fetch logs from all containers in test pods
...
When a test pod contains multiple containers (e.g. Istio/Consul/Vault
sidecars), 'helm test --logs' failed with 'a container name must be
specified'. This happened because GetPodLogs called the Kubernetes log
API without specifying a container name.
The fix fetches the pod spec first, then iterates over all containers
(init containers + regular containers) and requests logs for each one
explicitly. Errors from individual containers are collected and returned
together via errors.Join rather than aborting on the first failure.
Also fixes a typo: hooksByWight -> hooksByWeight.
Closes #6902
Signed-off-by: Sebastien Tardif <SebTardif@ncf.ca>
2 months ago
Matthieu MOREL
f8ba28bb17
testifylint: enable error-is-as and error-nil rules
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
3 months ago
George Jenkins
4bd9e90aa0
Merge pull request #30811 from mmorel-35/testifylint
...
chore: fix bool-compare issues from testifylint
3 months ago
Matheus Pimenta
8f56f24d63
fix(templating): hooks conflicting with templates in post-renderers ( #32049 )
...
* fix(templating): hooks conflicting with templates in post-renderers
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
* fix(templating): allow disabling hooks from postrenderers entirely
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
---------
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
3 months ago
George Jenkins
66e5049405
Merge pull request #32008 from rhysmcneill/bugfix/helm-upgrade-err-variable-defect
...
fix(action): return correct error variable in prepareUpgrade
3 months ago
Matheus Pimenta
265c5eb530
fix(templating): SplitManifests must preserve line endings for downstream YAML parsers ( #31952 )
...
* fix(templating): SplitManifests must preserve line endings for downstream YAML parsers
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
* Address copilot comment about skipping empty docs
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
* Port fix to release v2
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
* Address copilot comments
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
---------
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
3 months ago
Matheus Pimenta
a27f1add79
fix(templating): fix wrong YAML separator parsing for post-renderers ( #31941 )
...
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
3 months ago
Rhys McNeill
8ef2d45934
fix(action): return correct error variable in prepareUpgrade
...
When Deployed() succeeds but releaserToV1Release() fails, prepareUpgrade
returned err (nil) instead of cerr (the conversion error), causing a
silent nil return that could lead to nil pointer dereferences downstream.
Closes #32007
Signed-off-by: Rhys McNeill <rhysmcneill7@hotmail.co.uk>
3 months ago
Matthieu MOREL
7edfff33eb
chore: fix unnecessary-format issues from revive
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
4 months ago
Matthieu MOREL
071558d69f
chore: fix bool-compare issues from testifylint
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
4 months ago
George Jenkins
42f78ba60e
Merge pull request #31872 from mmorel-35/perfsprint-pkg-6-5f845e3
...
chore(pkg): fix perfsprint linter issues part 6
4 months ago
George Jenkins
e3b4808450
Merge pull request #31874 from mmorel-35/perfsprint-pkg-4-fb6db58
...
chore(pkg): fix perfsprint linter issues part 4
4 months ago
George Jenkins
610547b570
Merge pull request #31873 from mmorel-35/perfsprint-pkg-5-3294250
...
chore(pkg): fix perfsprint linter issues part 5
4 months ago
Terry Howe
3e7b38fd04
Merge pull request #31868 from matheuscscp/fix-31867
...
fix: insert newline after doc separators glued to content by template trimming
4 months ago
Matheus Pimenta
af94abf976
fix: insert newline after doc separators glued to content by template trimming
...
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
4 months ago
George Jenkins
df8e0301ed
Merge pull request #31878 from mmorel-35/perfsprint-pkg-3-39f7a9f
...
chore(pkg): fix perfsprint linter issues part 3
4 months ago
George Jenkins
4f9f18c453
Merge pull request #31875 from mmorel-35/perfsprint-pkg-2-0e1acbc
...
chore(pkg): fix perfsprint linter issues part 2
4 months ago
George Jenkins
c4392033cc
Merge pull request #31853 from atombrella/feature/fmt_unneeded
...
Replace non-format use of t.Fatalf with t.Fatal
4 months ago
Matthieu MOREL
dc0e3f10c3
chore(pkg): fix perfsprint linter issues part 6
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
5 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>
5 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>
5 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>
5 months ago
Matthieu MOREL
0fecfd04c2
chore(pkg): enable perfsprint linter
...
#### Description
enable perfsprint linter in pkg/cmd
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
5 months ago
Matthieu MOREL
6c2cb2f547
chore(pkg): enable perfsprint linter
...
#### Description
enable perfsprint linter in pkg/cmd
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
5 months ago
Mads Jensen
36cb3a2fe9
Replace unneeded use of t.Fatalf with t.Fatal
...
Signed-off-by: Mads Jensen <atombrella@users.noreply.github.com>
5 months ago
George Jenkins
be7cdb69e5
Merge pull request #31806 from mmorel-35/errorlint-pkg-4-15f432a
...
fix(pkg): errorlint linter
5 months ago
George Jenkins
3dfc4f3cf6
Merge pull request #31858 from helm/gjenkins/go_fix
...
chore: `go fix` fixes
5 months ago
George Jenkins
3ad9ccdb19
Merge pull request #31563 from Mujib-Ahasan/dry-run-fix
...
fix: --dry-run=server now respect generateName
5 months ago
George Jenkins
92b64e87ad
chore: fixes
...
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
5 months ago
Joe Julian
947b429cdd
Merge pull request #31801 from mmorel-35/modernize-pkg-4-062b248
...
chore(pkg): fix modernize linter
5 months ago
Joe Julian
78f5af72be
Merge pull request #31802 from mmorel-35/modernize-pkg-5-a3c8fdb
...
chore(pkg): fix modernize linter
5 months ago
Joe Julian
70899a6b3f
Merge pull request #31578 from manute/main
...
fix(action): crd resources can be empty
5 months ago
Joe Julian
56d0d9374a
Merge pull request #31810 from mmorel-35/errorlint-pkg-5-dda0145
...
fix(pkg): errorlint linter
5 months ago
Matthieu MOREL
259f76a849
fix(pkg): errorlint linter
...
errorlint linter in pkg/cmd
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
5 months ago
Matthieu MOREL
4d0ae7f33a
fix(pkg): errorlint linter
...
#### Description
errorlint linter in pkg
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
5 months ago
Matthieu MOREL
c8989d984f
fix(pkg): errorlint linter
...
#### Description
errorlint linter in pkg
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
5 months ago
Manuel Alonso
9817a68618
fix(install): check nil for restClientGetter and fix tests
...
Signed-off-by: Manuel Alonso <434575+manute@users.noreply.github.com>
5 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>
5 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>
5 months ago
Matheus Pimenta
c1cc625323
chore(defaults): server-side apply SDK defaults should always match the CLI defaults
...
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
6 months ago
Manuel Alonso
7c089bed26
Merge branch 'main' into main
...
Signed-off-by: Manuel Alonso <434575+manute@users.noreply.github.com>
6 months ago
Manuel Alonso
6501ef490a
chore(refactor): better testing and functionality for installing crd
...
Signed-off-by: Manuel Alonso <m.alonso@Manuels-MacBook-Pro.local>
6 months ago
Matheus Pimenta
59ece92bed
pkg/kube: introduce support for custom kstatus readers
...
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
6 months ago
Manuel Alonso
0f949a92c1
fix(test): fix tests and check nil for restclient
...
Signed-off-by: Manuel Alonso <m.alonso@Manuels-MacBook-Pro.local>
6 months ago
Manuel Alonso Gonzalez
561410ae1d
fix(test): merge fix correctly
...
Signed-off-by: Manuel Alonso Gonzalez <434575+manute@users.noreply.github.com>
Signed-off-by: Manuel Alonso Gonzalez <m.alonso@Manuels-MacBook-Pro.local>
6 months ago