Commit graph

54 commits

Author SHA1 Message Date
manslaughter03
bc44614a78 fix: wrap run release test error in case GetPodLogs failed.
Signed-off-by: manslaughter03 <manslaughter03@gmail.com>
2025-06-11 00:45:34 +02:00
Terry Howe
93ec064640
fix: repo update cmd mutex
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
2025-06-06 06:47:50 -06:00
Matthieu MOREL
56a2bb4188 chore: enable usetesting linter
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-05-30 08:12:11 +02:00
Robert Sirchia
83c26845ad
Merge pull request #30904 from benoittgt/document-ideal-registry-login-command
[Doc] Help users avoid specifying URL scheme and path with `helm registry`
2025-05-23 08:06:12 -04:00
Benoit Tigeot
cb730c94b5
Help users avoid specifying URL scheme an path
We’ve noticed that some users still include the URL scheme and full path
when logging into an OCI registry, for example:

```sh
helm registry login -u $OCI_REGISTRY_USER --password-stdin oci://ghcr.io/org/repo
```

This is no longer necessary and will not be supported in Helm v4.

To guide users toward the correct usage, we should show an example of
the ideal command.

Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-05-23 11:44:52 +02:00
Matt Farina
cf7613ba6b
Reverting fix "renders int as float"
This reverts #13533

This change has caused issues with numerous charts around things
unrelated to toml. This is because of functions like typeIs/typeOf
being used and acted upon.

The change caused a significant regression.

Note: This kind of change can be put into v3 charts, that are in
active development, without causing a regression.

Closes #30880

Signed-off-by: Matt Farina <matt@mattfarina.com>
2025-05-21 15:09:01 -04:00
Matt Farina
ab56ac62ba
Merge pull request #30866 from mmorel-35/thelper
chore: enable thelper linter
2025-05-20 14:47:54 +01:00
Matthieu MOREL
157f0ba10a chore: enable thelper
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-05-16 10:25:08 +02:00
Matt Farina
b5a4781099
Adding test for list command
Signed-off-by: Matt Farina <matt.farina@suse.com>
2025-05-15 15:23:13 -04:00
Ayush Tiwari
56b688145f
added cmd in repo_list.go for pipeline
Co-authored-by: Terry Howe <terrylhowe@gmail.com>
Signed-off-by: Ayush Tiwari <55987406+ayushontop@users.noreply.github.com>
2025-05-13 18:22:11 +05:30
Ayush Tiwari
e63cbae886
added cmd.ErrOrStderr()
Signed-off-by: Ayush Tiwari <55987406+ayushontop@users.noreply.github.com>
2025-05-07 02:46:58 +05:30
Ayush Tiwari
95328ea0a6
removed error import
Signed-off-by: Ayush Tiwari <55987406+ayushontop@users.noreply.github.com>
2025-05-07 02:11:46 +05:30
Ayush Tiwari
058bc083a8
changed Error to print
Signed-off-by: Ayush Tiwari <55987406+ayushontop@users.noreply.github.com>
2025-05-07 00:38:13 +05:30
findnature
ac8d2f9aed refactor: use slices.Contains to simplify code
Signed-off-by: findnature <cricis@aliyun.com>
2025-05-02 09:43:25 +08:00
Justen Stall
73545f9a3e
one more test output
Signed-off-by: Justen Stall <39888103+justenstall@users.noreply.github.com>
2025-04-21 16:08:21 -04:00
Justen Stall
4a6092bd6c
update another test output
Signed-off-by: Justen Stall <39888103+justenstall@users.noreply.github.com>
2025-04-21 16:04:28 -04: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
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
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
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
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
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
Benoit Tigeot
cbaac7652d
Call slog directly instead of using a wrapper
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-04-10 15:35:36 +02:00
Benoit Tigeot
6b5fa33633
debug log level is dynamic and set after Logger creation
So we should use dynamic handler to set the log level after. With this
patch we can clearly see the output. Before we were always stuck in log
level "info" and not seeing debug log level

```
bin/helm upgrade --install --debug --wait frontend \
--namespace test \
--set replicaCount=2 \
--set backend=http://backend-podinfo:9898/echo \
podinfo/podinfo
level=DEBUG msg="getting history for release" release=frontend
level=DEBUG msg="preparing upgrade" name=frontend
level=DEBUG msg="performing update" name=frontend
level=DEBUG msg="creating upgraded release" name=frontend
level=DEBUG msg="checking resources for changes" resources=2
level=DEBUG msg="no changes detected" kind=Service name=frontend-podinfo
level=DEBUG msg="patching resource" kind=Deployment name=frontend-podinfo namespace=test
level=DEBUG msg="waiting for resources" count=2 timeout=5m0s
level=DEBUG msg="waiting for resource" name=frontend-podinfo kind=Deployment expectedStatus=Current actualStatus=Unknown
level=DEBUG msg="updating status for upgraded release" name=frontend
Release "frontend" has been upgraded. Happy Helming!
NAME: frontend
LAST DEPLOYED: Thu Apr 10 09:56:25 2025
NAMESPACE: test
STATUS: deployed
REVISION: 6
DESCRIPTION: Upgrade complete
```

Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-04-10 10:03:13 +02: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
Benoit Tigeot
710770eed4
Linting
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-04-07 17:49:03 +02:00
Benoit Tigeot
b2380720eb
Migrate to pure slog without a custom wrapper
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-04-07 16:46:08 +02:00
Benoit Tigeot
b42767be40
Migrate more code to log adapter
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-04-07 15:36:52 +02:00
Benoit Tigeot
83cdffe4ae
Migrate to a dedicated internal package for slog adapter + migrate more
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-04-07 15:36:36 +02:00
Benoit Tigeot
fae2345edf
Demonstrate the impact of having Logger defined in kube package
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-04-07 15:36:15 +02:00
Suleiman Dibirov
000c098a41 fix(concurrency): add mutex to protect repoFailList and out in updateCharts
Signed-off-by: Suleiman Dibirov <idsulik@gmail.com>
2025-04-05 17:47:38 +03:00
Austin Abro
83266254f0
merge
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
2025-03-25 14:01:28 +00:00
Austin Abro
386523bdbc
update to get waiter instead of set
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
2025-03-25 13:55:39 +00:00
Matt Farina
e4e602e13c
Error when failed repo update.
In Helm v3 we did not change exit codes for existing commands to
maintain compat. A flag was introduced so a failure would result
in a non-0 exit code. A note was left to make this the default
in Helm v4. That's what this change does.

Closes #10016

Signed-off-by: Matt Farina <matt.farina@suse.com>
2025-03-21 08:19:35 -04:00
Austin Abro
d78b7e401a
go mod tidy
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
2025-03-20 16:32:31 +00: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
Austin Abro
0dffe83ef3
warnings
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
2025-03-07 14:35:44 +00:00
Austin Abro
e773a810ee
Update pkg/cmd/flags.go
Co-authored-by: George Jenkins <gvjenkins@gmail.com>
Signed-off-by: Austin Abro <37223396+AustinAbro321@users.noreply.github.com>
2025-03-07 09:30:28 -05:00
Austin Abro
0b513dcd42
Merge branch 'main' into refactor-wait 2025-03-04 22:46:43 +00:00
Austin Abro
68f72e5c3f
hook only strategy when wait=false
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
2025-03-03 19:56:00 +00:00
Austin Abro
022d4db6af
move logic from cmd/helm to pkg/cmd
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
2025-03-03 18:43:03 +00:00
Austin Abro
20c75f0c10
fix namespace assignment not passing through
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
2025-03-03 17:26:21 +00:00
Rongrong Liu
12b8eb8b61 fix:add proxy support when mTLS configured
Signed-off-by: Rongrong Liu <lori.rongrong.liu@gmail.com>
2025-03-01 07:41:06 -08:00
Austin Abro
1704ce3067
Merge branch 'main' into refactor-wait 2025-02-27 21:23:26 +00:00
Austin Abro
d3814d786b
merge
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
2025-02-27 13:55:49 +00:00