Commit graph

27 commits

Author SHA1 Message Date
Scott Rigby
bcb83e465f
Fix cherry-pick helm.sh/helm/v4 -> helm.sh/helm/v3
Signed-off-by: Scott Rigby <scott@r6by.com>
2025-02-21 19:19:39 -05:00
Chris Berry
b8e13878fc
Add HookOutputFunc and generic yaml unmarshaller
Signed-off-by: Chris Berry <bez625@gmail.com>
2025-02-21 19:00:41 -05:00
Scott Rigby
97b0e11871
clarify fix error message
Signed-off-by: Scott Rigby <scott@r6by.com>
2025-02-21 19:00:41 -05:00
Scott Rigby
2f79afb0a3
fix err check
Co-authored-by: George Jenkins <gvjenkins@gmail.com>
Signed-off-by: Scott Rigby <scott@r6by.com>
2025-02-21 19:00:40 -05:00
Scott Rigby
c77f4ec6c4
remove comments about previous functionality
Signed-off-by: Scott Rigby <scott@r6by.com>
2025-02-21 19:00:40 -05:00
Scott Rigby
3cd6afe845
add short circuit return
Co-authored-by: George Jenkins <gvjenkins@gmail.com>
Signed-off-by: Scott Rigby <scott@r6by.com>
2025-02-21 19:00:40 -05:00
Chris Berry
5367001f4f
Update based on review comments
Signed-off-by: Chris Berry <bez625@gmail.com>
2025-02-21 19:00:40 -05:00
Chris Berry
3c445158d8
Update based on review comments
Signed-off-by: Chris Berry <bez625@gmail.com>
2025-02-21 19:00:39 -05:00
Chris Berry
4cb639ed4e
Fix lint
Signed-off-by: Chris Berry <bez625@gmail.com>
2025-02-21 18:55:47 -05:00
Chris Berry
ca90972b3d
Add hook annotations to output pod logs to client on success and fail
Signed-off-by: Chris Berry <bez625@gmail.com>
2025-02-21 18:54:56 -05:00
Matt Farina
9f620b857a 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>
(cherry picked from commit 5727f56a96)
2024-12-28 12:06:27 -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