Commit graph

40 commits

Author SHA1 Message Date
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
Austin Abro
f04c456bd6
gofmt
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
2025-02-26 13:21:00 +00:00
Austin Abro
9f9eb28fed
merge
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
2025-02-26 13:20:35 +00:00
Austin Abro
1cb4e66044
merge conflict
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
2025-02-25 15:00:48 +00:00
Austin Abro
297f7b9acb
squash
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
2025-02-24 15:11:54 +00:00