Commit graph

9032 commits

Author SHA1 Message Date
Zadkiel AHARONIAN
31bd995ce2
fix(getter): pass settings environment variables
Signed-off-by: Zadkiel AHARONIAN <hello@zadkiel.fr>
(cherry picked from commit 119341dca7)
2026-01-14 17:43:08 -05:00
Mohsen Mottaghi
41a6b364a1
test(statuswait): fix Copilot code review suggestion for goroutine in tests
Signed-off-by: Mohsen Mottaghi <mohsenmottaghi@outlook.com>
(cherry picked from commit d6b35cedeb)
2026-01-14 17:42:41 -05:00
Mohsen Mottaghi
2a2e6f722a
test(statuswait): add more tests suggested by Copilot code review
add missing coverage for the positive case where cluster-scoped resources (like ClusterRole or Namespace) should work correctly

Signed-off-by: Mohsen Mottaghi <mohsenmottaghi@outlook.com>
(cherry picked from commit a1543d5947)
2026-01-14 17:42:36 -05:00
Mohsen Mottaghi
3818c02f81
test(statuswait): add some tests for statuswait
Adding some tests for multi namespace deployment, simulate restrcited rbac access and mixed namespace scope and cluster scope resources

Signed-off-by: Mohsen Mottaghi <mohsenmottaghi@outlook.com>
(cherry picked from commit dd44f4ecd0)
2026-01-14 17:42:30 -05:00
Mohsen Mottaghi
66cab24bb9
fix: use namespace-scoped watching to avoid cluster-wide LIST permissions
Signed-off-by: Mohsen Mottaghi <mohsenmottaghi@outlook.com>
(cherry picked from commit 3dd54ed0b6)
2026-01-14 17:42:11 -05:00
Calvin Bui
abf2007685
Use length check for MetaDependencies instead of nil comparison
Signed-off-by: Calvin Bui <3604363+calvinbui@users.noreply.github.com>
(cherry picked from commit b33d4ae0c0)
2026-01-14 17:33:30 -05:00
Benoit Tigeot
4b3de18628
Deal with golint warning with private executeShutdownFunc
```
  Error: pkg/action/release_testing.go:60:57: unexported-return: exported method Run returns unexported type action.executeShutdownFunc, which can be annoying to use (revive)
  func (r *ReleaseTesting) Run(name string) (ri.Releaser, executeShutdownFunc, error) {

```

Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
(cherry picked from commit 45c5f3aaca)
2026-01-14 17:01:55 -05:00
Benoit Tigeot
321277002a
Code review
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
(cherry picked from commit 70fc5f97e2)
2026-01-14 17:01:49 -05:00
Benoit Tigeot
417aae9c01
Fix linting issue
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
(cherry picked from commit 9f1c8a26f0)
2026-01-14 17:01:45 -05:00
Michelle Fernandez Bieber
6c838b4a18
Update pkg/action/hooks.go
Co-authored-by: Marco Lecheler <marco@task.media>
Signed-off-by: Michelle Fernandez Bieber <37021266+mfbieber@users.noreply.github.com>
(cherry picked from commit 6bb5bcc212)
2026-01-14 17:01:41 -05:00
Michelle Fernandez Bieber
c5d87f2f7d
added check for nil shutdown
Signed-off-by: Michelle Fernandez Bieber <mfbieber@gmail.com>
(cherry picked from commit d9301441f4)
2026-01-14 17:01:37 -05:00
Michelle Fernandez Bieber
53175b76c7
cleaned up empty line
Signed-off-by: Michelle Fernandez Bieber <mfbieber@gmail.com>
(cherry picked from commit 7a61ebf013)
2026-01-14 17:01:32 -05:00
Michelle Fernandez Bieber
d2df1ab59e
updated comment and made defer of shutdown function return errors as before and not the possible shutdown error
Signed-off-by: Michelle Fernandez Bieber <mfbieber@gmail.com>
(cherry picked from commit 10714772be)
2026-01-14 17:01:28 -05:00
Michelle Fernandez Bieber
5b223de7c8
added shutdown hook that is executed after the logs have been retrieved
Signed-off-by: Michelle Fernandez Bieber <mfbieber@gmail.com>
(cherry picked from commit 7a557580e1)
2026-01-14 17:01:24 -05:00
tison
e845b68fe3
Fix TestCliPluginExitCode
Signed-off-by: tison <wander4096@gmail.com>
(cherry picked from commit 3c6557dcf5)
2026-01-14 16:58:00 -05:00
tison
30bfd57c5f
Check plugin name is not used
Signed-off-by: tison <wander4096@gmail.com>
(cherry picked from commit 5196b8431a)
2026-01-14 16:57:48 -05:00
Feruzjon Muyassarov
0fd2c418b0
Fix rollback for missing resources
Signed-off-by: Feruzjon Muyassarov <feruzjon.muyassarov@est.tech>
(cherry picked from commit 374aeb4b4e)
2026-01-14 16:54:12 -05:00
LinPr
b456e27465
fix: assign KUBECONFIG environment variable value to env.Kubeconfig
Signed-off-by: LinPr <314573849@qq.com>
(cherry picked from commit b25fa862d5)
2026-01-14 16:51:39 -05:00
Hidde Beydals
e2021f8818
fix(rollback): errors.Is instead of string comp
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
(cherry picked from commit d158708fbf)
2026-01-14 16:51:38 -05:00
Hidde Beydals
af7c15303a
fix(uninstall): supersede deployed releases
This ensures that when `helm uninstall` is run with `--keep-history`
any release in a `deployed` state other than the last release (e.g.
due to a failed upgrade) is being marked as `superseded`.

As a by-effect, running `helm upgrade` on a release which has been
uninstalled after an upgrade failure now no longer works. But instead
fails with a `"<name>" has no deployed releases` error. Which is the
(likely) intended behavior, and prevents other side-effects like
rolling back to a release version which happened before the uninstall
if `--atomic` (or `--rollback-on-failure`) was provided.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
(cherry picked from commit 2f1ecc7100)
2026-01-14 16:51:38 -05:00
George Jenkins
8650e1dad9
Merge pull request #31646 from gjenkins8/gjenkins/bump_4.0.3_CVE_deps
Some checks failed
build-test / build (push) Has been cancelled
golangci-lint / golangci-lint (push) Has been cancelled
govulncheck / govulncheck (push) Has been cancelled
Bump v4.0.3 CVE dependencies
2025-12-12 16:39:50 -08:00
George Jenkins
cd700e0627 Bump v4.0.3 CVE deps
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
2025-12-12 16:24:11 -08:00
Matt Farina
9db13ee5c3
Use latest patch release of Go in releases
Some checks are pending
build-test / build (push) Waiting to run
golangci-lint / golangci-lint (push) Waiting to run
GitHub Actions has a cache of tools, like Go, and it does not update
this cache when a new version comes out. It can take more than a week
for a new version to be available.

This change forces the action to check if a newer version is available
than is in the cache.

Closes #31634

Signed-off-by: Matt Farina <matt.farina@suse.com>
(cherry picked from commit 8f636b5bd2)
2025-12-11 12:39:48 -05:00
Benoit Tigeot
94659f2503
fix: prevent reporting fallback on version when none specified
Some checks are pending
build-test / build (push) Waiting to run
golangci-lint / golangci-lint (push) Waiting to run
Fixes: https://github.com/helm/helm/issues/31548

```
❯ helm pull rancher/longhorn-crd --version 106.2.0+up1.8.2 --destination /tmp/

level=WARN msg="unable to find exact version; falling back to closest available version" chart=longhorn-crd requested=106.2.0+up1.8.2 selected=106.2.0+up1.8.1

❯ bin/helm show chart brigade/brigade

apiVersion: v1
appVersion: v1.5.0
dependencies:
- condition: kashti.enabled
  name: kashti
  repository: https://brigadecore.github.io/charts
  version: 0.7.0
- condition: brigade-github-app.enabled
  name: brigade-github-app
  repository: https://brigadecore.github.io/charts
  version: 0.8.0
- alias: gw
  condition: gw.enabled
  name: brigade-github-oauth
  repository: https://brigadecore.github.io/charts
  version: 0.4.0
description: Brigade provides event-driven scripting of Kubernetes pipelines.
name: brigade
version: 1.10.0
```

Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
(cherry picked from commit 40e22dedb2)
2025-12-10 15:25:38 -05:00
Benoit Tigeot
2dd1f662cc
fix: prevent segmentation violation on empty yaml in multidoc
Fixes: https://github.com/helm/helm/issues/31544

Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
(cherry picked from commit 81d244ca21)
2025-12-10 15:24:58 -05:00
Benoit Tigeot
bbad438779
Ignore duplicated URN in logs
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
(cherry picked from commit 8025a397e6)
2025-12-10 15:23:31 -05:00
Benoit Tigeot
bdcf920183
jsonschema: warn and ignore unresolved URN $ref to match v3.18.4
- v3.18.5 switched jsonschema and began resolving external $ref
  at compile-time, exposing missing urn handling
  (“no URLLoader registered for urn:…”).
- Add urn scheme loader and pluggable URNResolver. If unresolved, log
  a warning and return a permissive true schema (back-compat).
- Apply to pkg/chart/v2 and internal/chart/v3 validators. Not sure about
  that

Note: external URNs need AddResource/Resolver (the CLI uses --map for
this). Warning may appear twice since both validators run.

Another strategy could be to add the option to import more "external
schema" explicitly but it is another PR. Something similar to `--map`
from jsonschema package
(santhosh-tekuri/jsonschema@ed65924).

Close: #31170

Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
(cherry picked from commit 03bb62f63d)
2025-12-10 15:22:36 -05:00
George Jenkins
9ac7c2b609
Publish Helm v4 -> helm-latest-version
Some checks failed
build-test / build (push) Has been cancelled
golangci-lint / golangci-lint (push) Has been cancelled
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
(cherry picked from commit e4353dc8db)
2025-11-25 15:15:29 -05:00
George Jenkins
0bef6bdbe6
fix: Fix Helm v4 release distribtion/get-helm-3 script
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
(cherry picked from commit d5d1ea3f55)
2025-11-25 15:14:56 -05:00
George Jenkins
12500dd401
Copy adopted resource info
Some checks failed
build-test / build (push) Has been cancelled
golangci-lint / golangci-lint (push) Has been cancelled
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
(cherry picked from commit 855ebb6884)
2025-11-24 08:57:30 -05:00
George Jenkins
1cf3841142
fixup test
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
(cherry picked from commit f8a49f1852)
2025-11-24 08:56:51 -05:00
George Jenkins
32e2d08c45
logs
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
(cherry picked from commit a9cdc78116)
2025-11-24 08:56:37 -05:00
George Jenkins
4b6472ffb0
fix
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
(cherry picked from commit b1a976073f)
2025-11-24 08:56:23 -05:00
George Jenkins
9dfe3b35ec
fix: Use server-side apply for object create during update
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
(cherry picked from commit 18616e6ce9)
2025-11-24 08:56:05 -05:00
Matt Farina
861adc2f4a
Fix kube client logging
The kube client logging is based on the actionConfig logging. This
is setup to use slog.Default() before the logging flags are parsed
and logging is setup.

newRootCmdWithConfig changes the logging but it wasn't picked up
for actionConfig or the kube client. This change updates the logging
to include any changes.

Signed-off-by: Matt Farina <matt.farina@suse.com>
(cherry picked from commit 936cd328ac)
2025-11-24 08:55:27 -05:00
yxxhero
b2f7872695
update tests
Signed-off-by: yxxhero <aiopsclub@163.com>
(cherry picked from commit 8c87024860)
2025-11-24 08:54:25 -05:00
yxxhero
77f97a169e
Refactor environment variable expansion in PrepareCommands and update tests
Signed-off-by: yxxhero <aiopsclub@163.com>
(cherry picked from commit 2d49f0cb4a)
2025-11-24 08:54:09 -05:00
Fish-pro
a156195c35
Fix syntax errors in the document
Signed-off-by: Fish-pro <zechun.chen@daocloud.io>
(cherry picked from commit faa0adcb38)
2025-11-24 08:53:13 -05:00
Benoit Tigeot
2c0dcda29b
fix: correct LDFLAGS path for default Kubernetes version
The Makefile LDFLAGS were pointing to an incorrect package path
(helm.sh/helm/v4/pkg/chart/common/util) that doesn't exist, causing
the k8sVersionMajor and k8sVersionMinor variables to silently fail
to be set. This left the hardcoded defaults (1.20) in place.

After this fix, `helm template` now correctly defaults to Kubernetes
v1.34.0 (matching the bundled client-go version) instead of v1.20.0,
ensuring charts render with current stable API versions.

Testing scenario:

```sh
cat > /tmp/test-chart/Chart.yaml << 'EOF'
apiVersion: v2
name: test-chart
version: 1.0.0
kubeVersion: ">= 1.28.0-0"
EOF

./bin/helm template test-release /tmp/test-chart

cat > /tmp/test-chart-fail/Chart.yaml << 'EOF'
apiVersion: v2
name: test-chart-fail
version: 1.0.0
kubeVersion: ">= 1.35.0-0"
EOF

./bin/helm template test-release /tmp/test-chart-fail

Exit code 1
Error: chart requires kubeVersion: >= 1.35.0-0 which is incompatible with Kubernetes v1.34.0
```

Fixes #31508
Closes #31501
Closes #31502

Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
(cherry picked from commit b6a8c65216)
2025-11-24 08:52:29 -05:00
Scott Rigby
99cd196435
Merge pull request #31435 from matheuscscp/cancel-health-checks
Some checks failed
build-test / build (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
golangci-lint / golangci-lint (push) Has been cancelled
release / release (push) Has been cancelled
release / canary-release (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
Introduce a context for canceling wait operations
2025-11-03 13:56:13 -05:00
Matheus Pimenta
efc1702657
Introduce a context for canceling wait operations
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-11-01 17:55:33 +00:00
George Jenkins
bdc459d73c
Merge pull request #31389 from TerryHowe/chore-more-registry-clean-up
Some checks failed
build-test / build (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
golangci-lint / golangci-lint (push) Has been cancelled
release / release (push) Has been cancelled
release / canary-release (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
chore: fix pkg/registry warnings to reduce noise
2025-10-30 10:43:42 -07:00
George Jenkins
841d8d7e76
Merge pull request #31364 from helm/dependabot/github_actions/main/github/codeql-action-4
chore(deps): bump github/codeql-action from 3 to 4
2025-10-30 09:37:46 -07:00
Matt Farina
9bed143103
Merge pull request #31323 from mattfarina/reproducible-chart-builds
Some checks are pending
build-test / build (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
golangci-lint / golangci-lint (push) Waiting to run
release / release (push) Waiting to run
release / canary-release (push) Waiting to run
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run
Reproducible chart archive builds
2025-10-29 16:06:25 -04:00
Matt Farina
8834d90c60
Merge pull request #31440 from mattfarina/bump-go-1.25
Updating Go and golangci-lint versions
2025-10-29 15:17:56 -04:00
Matt Farina
15300549f0
When time not available, using time.Now
Note, when time is not available, the builds are not reproducible.
This problem would only happen when an SDK user is using parts of
the API to build their own tooling. Helm will consistently inject
the dates through the higher level APIs.

Signed-off-by: Matt Farina <matt.farina@suse.com>
2025-10-29 15:11:20 -04:00
Matt Farina
c6334c2ac5
Updating Go and golangci-lint versions
Signed-off-by: Matt Farina <matt.farina@suse.com>
2025-10-29 14:13:17 -04:00
Matt Farina
ca8eae9361
Reproducible chart archive builds
Building the same chart into an archive multiple times will have
the same sha256 hash.

Perviously, the time in the headers for a file was time.Now() which
changed each time. The time is now collected from the operating
system when the file is loaded and this time is used.

Fixes: #3612

Signed-off-by: Matt Farina <matt.farina@suse.com>
2025-10-29 11:49:22 -04:00
Scott Rigby
f4c5220d99
Merge pull request #31411 from banjoh/em/reinstate-logger-param
Some checks are pending
build-test / build (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
golangci-lint / golangci-lint (push) Waiting to run
release / release (push) Waiting to run
release / canary-release (push) Waiting to run
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run
feat: reinstate logger parameter to actions package
2025-10-29 10:03:03 -04:00
Evans Mungai
2ddeb50fa6
Set default logger in Configuration constructor
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
2025-10-23 18:09:58 +01:00