Commit Graph

47 Commits

Author SHA1 Message Date
George Jenkins e2dcbe28bf Helm client/SDK support server-side apply
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
2025-08-18 10:05:07 -07:00
George Jenkins b2dc411f9d code review (error checks, collapse forceConflicts, UpdateApplyFunc)
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
2025-08-12 11:04:20 -07:00
George Jenkins 45141451b4 Kube client support server-side apply
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
2025-08-12 10:50:46 -07:00
Evans Mungai 85243914a4
feat: switch yaml library to go.yaml.in/yaml/v3
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
2025-07-30 12:14:09 +01:00
acceptacross 9623fb80f1 chore: fix some function names in comment
Signed-off-by: acceptacross <csqcqs@gmail.com>
2025-06-04 23:54:30 +08:00
Terry Howe a8cbf3aa51 fix: action hooks delete policy mutex
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
2025-05-30 08:12:20 -04:00
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 065e2eb3eb
updates after merge conflict resolution
Signed-off-by: Justen Stall <39888103+justenstall@users.noreply.github.com>
2025-04-21 12:17:50 -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
Benoit Tigeot d33e2896f0
Prevent failures with method signatures on hooks
changes on wait strategy. This PR try to fix linting and tests.

Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-04-17 12:37:37 +02:00
Scott Rigby e397f44840
Merge pull request #30673 from nvanthao/process-all-hook-deletions-on-failure
fix: Process all hook deletions on failure
2025-04-16 17:21:28 -04: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
Gerard Nguyen aa9e4bb42d rebase
Signed-off-by: Gerard Nguyen <gerard@replicated.com>
2025-03-15 09:13:02 +11:00
Laszlo Uveges 2eea520ba4 Delete previously successful hooks when a later hook fails
Signed-off-by: Laszlo Uveges <laszlo@giantswarm.io>
2025-03-15 08:30:22 +11:00
Austin Abro 1a3fb75b34
merge
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
2025-02-27 13:56:52 +00:00
Matt Farina e711488970
Move pkg/release to pkg/release/v1 to support v3 charts
This is part of HIP 20 which provides a means to have v3 charts
that live alongside v2 charts while having breaking changes.

The plan is to have a different release object for v3 chart
instances for at least a couple reasons:
1. So that the chart object on the release can be fundamentally
   different.
2. So that Helm v3 does not detect or try to work with instances
   of charts whose apiVersion it does not know about.

Note: it is expected that Helm v3 usage will be used long after
the Helm project no longer supports it. 5 years after Helm v2
had reached end-of-life there was still usage of it.

Note: The release util package is separate from the versioned
elements as it is planned to use generics to handle multiple
release object versions.

Signed-off-by: Matt Farina <matt.farina@suse.com>
2025-02-26 10:14:15 -05:00
Austin Abro 11eeb4a6b1
merge
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
2025-02-25 14:36:29 +00:00
Chris Berry 6d30fa5990 Add HookOutputFunc and generic yaml unmarshaller
Signed-off-by: Chris Berry <bez625@gmail.com>
2025-02-21 12:33:12 +00:00
Scott Rigby 52ac92fb69 clarify fix error message
Signed-off-by: Scott Rigby <scott@r6by.com>
2025-02-21 12:31:08 +00:00
Scott Rigby e8a76bc3eb fix err check
Co-authored-by: George Jenkins <gvjenkins@gmail.com>
Signed-off-by: Scott Rigby <scott@r6by.com>
2025-02-21 12:31:08 +00:00
Scott Rigby 3796c1f4a1 remove comments about previous functionality
Signed-off-by: Scott Rigby <scott@r6by.com>
2025-02-21 12:31:08 +00:00
Scott Rigby f729b9ade0 add short circuit return
Co-authored-by: George Jenkins <gvjenkins@gmail.com>
Signed-off-by: Scott Rigby <scott@r6by.com>
2025-02-21 12:31:08 +00:00
Chris Berry 243cb2e21f Update based on review comments
Signed-off-by: Chris Berry <bez625@gmail.com>
2025-02-21 12:31:08 +00:00
Chris Berry 3d4e679d9f Update based on review comments
Signed-off-by: Chris Berry <bez625@gmail.com>
2025-02-21 12:31:08 +00:00
Chris Berry a55a477069 Fix lint
Signed-off-by: Chris Berry <bez625@gmail.com>
2025-02-21 12:31:08 +00:00
Chris Berry cde407b7d1 Add hook annotations to output pod logs to client on success and fail
Signed-off-by: Chris Berry <bez625@gmail.com>
2025-02-21 12:30:29 +00:00
Austin Abro 8ce1876192
get rid of ext interface
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
2025-01-06 14:12:34 +00:00
Matt Farina 2236294119 Updating to helm.sh/helm/v4
Since Helm is going through breaking changes with Helm v4, the version path to
Helm needs to be updated.

Signed-off-by: Matt Farina <matt.farina@suse.com>
2024-12-26 16:33:51 -05:00
Matt Farina 5727f56a96
Update to Go 1.23
Multiple changes were made to pass linting. Some Go built-in names
are being used for variables (e.g., min). This happens in the Go
source itself including the Go standard library and is not always
a bad practice.

To handle allowing some built-in names to be used the linter config
is updated to allow (via opt-in) some names to pass. This allows us
to still check for re-use of Go built-in names and opt-in to any
new uses.

There were also several cases where a value was checked for nil
before checking its length when this is already handled by len()
or the types default value. These were cleaned up.

The license validation was updated because it was checking everything
in the .git directory including all remote content that was local.
The previous vendor directory was from a time prior to Go modules
when Helm handled dependencies differently. It was no longer needed.

Signed-off-by: Matt Farina <matt.farina@suse.com>
2024-12-19 10:27:38 -05:00
Justen Stall 7df69020d8
revert duplicate slice conditions
Signed-off-by: Justen Stall <39888103+justenstall@users.noreply.github.com>
2024-11-18 22:50:17 -05:00
Justen Stall 63cf42a843
fix: replace "github.com/pkg/errors" with stdlib "errors" package
Signed-off-by: Justen Stall <39888103+justenstall@users.noreply.github.com>
2024-11-18 11:35:59 -05:00
Suleiman Dibirov f4f4a6b81f fix(hooks): correct hooks delete order
Signed-off-by: Suleiman Dibirov <idsulik@gmail.com>
2024-10-30 18:49:01 +02:00
zak905 fa025fc28b fix post install hook deletion due to before-hook-creation policy
Signed-off-by: zak905 <zakaria.amine88@gmail.com>
2023-02-09 21:46:05 +01:00
Daniel Strobusch 9a2ff7802f
fix(helm): sort hooks by kind for equal weight
Use the same install order for hooks as for normal resources (non-hooks) for hooks with equal weight.
This makes resource handling more consistent and helps, when there are hook consisting of several resources like e.g. a service account and a job using this service account.

The sort functions are changed from an in place search to an out of place sort to avoid inout parameters.

Closes #7416.

Signed-off-by: Daniel Strobusch <1847260+dastrobu@users.noreply.github.com>
2020-01-23 09:07:06 +01:00
Taylor Thomas 93abfd75ad Remove reference to stdtime to reduce confusion
Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2019-10-16 21:01:52 -05:00
Taylor Thomas aa429e150a feat(*): Adds custom time package for better marshalling
This package mainly exists to workaround an issue in Go
where the serializer doesn't omit an empty value for time:
https://github.com/golang/go/issues/11939. This replaces all
release and hook object time references with the new time package
so things actually marshal correctly

Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2019-10-15 14:13:19 -06:00
Jacob LeGrone 2d983f27e7
feat(hooks): never delete CustomResourceDefinitions
Signed-off-by: Jacob LeGrone <git@jacob.work>
2019-10-10 18:30:57 -04:00
Jacob LeGrone 34d685f8bf
feat(hooks): set default deletion policy to before-hook-creation
Signed-off-by: Jacob LeGrone <git@jacob.work>
2019-10-10 18:30:57 -04:00
Adam Reese 1e20ebae35
fix(pkg/kube): validate with OpenAPI on install
Signed-off-by: Adam Reese <adam@reese.io>
2019-10-09 14:25:47 -07:00
Adam Reese 572b92dc8a
feat(pkg/kube): add openapi validation for k8s objects
Add back OpenAPI validation for kubernetes objects.

Fixes: #6382

Signed-off-by: Adam Reese <adam@reese.io>
2019-10-08 12:55:19 -07:00
Matt Farina 9bc7934f35
Updating the module for v3 as the major version
Signed-off-by: Matt Farina <matt@mattfarina.com>
2019-10-03 14:27:05 -04:00
Matthew Fisher 4c366c972d
fix(action): return an error if len > 0
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2019-08-13 12:10:31 -07:00
Jacob LeGrone 2085228b50
feat(hooks): add Running phase
Signed-off-by: Jacob LeGrone <git@jacob.work>
2019-08-09 15:05:46 -04:00
Jacob LeGrone 4f6814afb5
refactor(hooks): replace hook execution Successful bool with HookPhase
Signed-off-by: Jacob LeGrone <git@jacob.work>
2019-08-07 14:54:35 -04:00
Jacob LeGrone 5ab42504f1
Merge branch 'dev-v3' of https://github.com/helm/helm into test-as-hook 2019-07-31 18:06:08 -04:00
Jacob LeGrone caa4240a30
refactor(release): track test executions via Hook type
Signed-off-by: Jacob LeGrone <git@jacob.work>
2019-07-31 15:33:56 -04:00
Jacob LeGrone 72127c391c
feat(test): define tests as Jobs and allow arbitrary supporting resources
This updates commands install, upgrade, delete, and test to share the
same implementation for hook execution.

BREAKING CHANGES:
- The `test-failure` hook annotation is removed.

Signed-off-by: Jacob LeGrone <git@jacob.work>
2019-07-31 15:33:56 -04:00