Commit graph

42 commits

Author SHA1 Message Date
Evans Mungai
0906fe7f6b
Add install test for TakeOwnership flag
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
2025-04-17 18:19:27 +01:00
Chris Berry
2aa90b8f26
Refactor based on review comment
Signed-off-by: Chris Berry <bez625@gmail.com>
2025-02-21 19:00:41 -05:00
Chris Berry
5739197faa
Refactor based on review comment
Signed-off-by: Chris Berry <bez625@gmail.com>
2025-02-21 19:00:41 -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
Suleiman Dibirov
800c33a5aa fix: update error handling in Configuration.Init method, add tests for the method
Signed-off-by: Suleiman Dibirov <idsulik@gmail.com>
2024-06-19 07:46:38 +03:00
Matt Farina
25c473834e Enabling hide secrets on install and upgrade dry run
This change adds a new flag to the install and upgrade commands in
the Helm client and properties to the install and upgrade action.
The new flag is --hide-secret and can only be used with the
--dry-run flag.

The --dry-run flag is designed to send all chart rendered manifests to
stdout so that they can be inspected.

When the --hide-secret flag is used the Secret content is removed from
the output.

Signed-off-by: Matt Farina <matt.farina@suse.com>
2024-03-13 08:34:28 -04:00
Matt Farina
4e7e939f19
Updating the Go version in go.mod
At this time both Go 1.19 and 1.20 are supported. The version
specified in the go.mod file is the minimum version we expect Helm
to be compiled against. This is the oldest supported version to
support environments where others compile Helm. The Helm project
is using Go 1.20 to build Helm itself.

Updating to Go 1.19 also includes dealing with io/ioutil
deprecation and some additional linting issues around staticcheck.
All the staticcheck issues were in test files so linting was
skipped for those.

Signed-off-by: Matt Farina <matt.farina@suse.com>
2023-03-22 11:52:30 -04:00
Matt Farina
50c22ed7f9
Bump the Go version
Needed to gofmt source to meet changes in style

Signed-off-by: Matt Farina <matt.farina@suse.com>
2023-03-22 11:29:26 -04:00
Eng Zer Jun
2e3e22a003
test: use T.TempDir to create temporary test directory
The directory created by `T.TempDir` is automatically removed when the
test and all its subtests complete.

Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-02-12 13:54:54 +08:00
Thomas Runyon
353d74e967 refactor internal/experimental/registry to pkg/registry
Signed-off-by: Thomas Runyon <runyontr@gmail.com>
2022-01-12 21:49:26 -05:00
Josh Dolitsky
00985cad6b
Implement changes proposed in HIP 6
For more information, please see the following URL:
https://github.com/helm/community/blob/main/hips/hip-0006.md

Note: OCI support remains experimental, and you are still
required to set HELM_EXPERIMENTAL_OCI=1 in your environment.

Signed-off-by: Josh Dolitsky <josh@dolit.ski>
2021-06-08 02:43:13 -04:00
Matt Butcher
ed5fba5142
refactor the release name validation to be consistent across Helm
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
2020-09-17 11:34:31 -06:00
Li Zhijian
ba4c8029c2 Use T.cleanup() to cleanup helm-action-test
T.Cleanup() is introduced since go-1.14

Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
2020-09-09 14:40:44 +08:00
Matt Butcher
524150c662
fix: use correct regular expression for Kubernetes names (#8013)
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
2020-05-01 14:02:47 -06:00
Martin Hickey
7b9dc71c25 Fix render error not being propogated
Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
2020-02-14 15:54:30 +00:00
Josh Dolitsky
7ce29e12fa
ref(go.mod): oras v0.8.1 (#6862)
* ref(go.mod): oras v0.8.1

Signed-off-by: Josh Dolitsky <393494+jdolitsky@users.noreply.github.com>

* update various module versions

Signed-off-by: Josh Dolitsky <393494+jdolitsky@users.noreply.github.com>

* upgrade oras v0.8.1

Signed-off-by: Josh Dolitsky <393494+jdolitsky@users.noreply.github.com>

* upgrade to oras 0.8.1 release

Signed-off-by: Josh Dolitsky <393494+jdolitsky@users.noreply.github.com>

* lock to oras release (0.8.1)

Signed-off-by: Josh Dolitsky <393494+jdolitsky@users.noreply.github.com>
2020-02-04 13:54:13 -06:00
Taylor Thomas
5a23663c6b
Merge pull request #6679 from thomastaylor312/feat/timestamp_hell
feat(*): Adds custom time package for better marshalling
2019-10-17 14:23:25 -05:00
Karuppiah Natarajan
dfed8ab5e3
fix install storing computed values in release
this was partially fixed in #6430 but the fix only
worked for values without nesting. this PR fixes it.
this is done by doing a deep copy of values rather
than a top level keys copy. deep copy ensures
values are not mutated during coalesce()
execution which leads to bugs like #6659

the deep copy code has been copied from:

https://gist.github.com/soroushjp/0ec92102641ddfc3ad5515ca76405f4d

which is in turn inspired by this stackoverflow answer:
http://stackoverflow.com/a/28579297/1366283

Signed-off-by: Karuppiah Natarajan <karuppiah7890@gmail.com>
2019-10-17 16:37:19 +05:30
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
Matthew Fisher
02999565a4
Merge pull request #6556 from karuppiah7890/conditional-dependencies-not-working-v3
fix(pkg/action): fix conditional dependencies not working with reuse values
2019-10-05 11:00:28 -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
Karuppiah Natarajan
337f52c566
fix(pkg/action): fix conditional dependencies not working with reuse values
Closes #6530

Signed-off-by: Karuppiah Natarajan <karuppiah7890@gmail.com>
2019-10-02 19:33:19 +05:30
Karuppiah Natarajan
25324ca8db
fix install storing computed values in release instead of user supplied values
Signed-off-by: Karuppiah Natarajan <karuppiah7890@gmail.com>
2019-09-14 20:34:48 +05:30
Josh Dolitsky
6095070817
ref(internal/experimental/registry): pkg refactor (#6205)
No more magic separating the metadata from chart tarball - charts are
pushed to registry as a single tarball layer with Chart.yaml in tact.

No more fragile custom symlink chart storage, now following
the OCI Image Layout Specification for chart filesystem cache.

Also:
- Update to ORAS 0.6.0
- Simplify registry client setup with NewClientWithDefaults()
- Remove needless annotations and constants

Fixes #6068
Fixes #6141

Signed-off-by: Josh Dolitsky <jdolitsky@gmail.com>
2019-08-12 15:17:18 -05:00
Jacob LeGrone
2bd94bc552
Merge branch 'dev-v3' of https://github.com/helm/helm into test-as-hook 2019-08-09 14:25:15 -04:00
Matthew Fisher
fe952445bd
feat(cmd): put OCI commands behind a feature gate
This adds a new `gates` package used for interacting with feature gates. It also marks the OCI registry work as experimental, signalling to users that it is not a stable feature of Helm.

Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2019-08-08 15:25:17 -07: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
Matthew Fisher
2045fab01f
ref(action): remove ParseReferenceWithChartDefaults
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2019-07-23 14:33:23 -07:00
Taylor Thomas
2c397b6879
Merge pull request #6011 from thomastaylor312/feat/atomic
feat(*) Adds atomic flag to v3
2019-07-18 10:14:21 -06:00
Matthew Fisher
d23d68d51c
Merge pull request #5881 from torstenwalter/template
helm 3: support writing multiple resources to the same file
2019-07-17 09:51:34 -07:00
Torsten Walter
ec038337a4
support writing multiple resources to the same file
Signed-off-by: Torsten Walter <mail@torstenwalter.de>
2019-07-17 17:55:50 +02:00
Taylor Thomas
29c343278e feat(action): Refactors unit tests with better fakes
This also adds unit tests for the Atomic and Wait functionality

Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2019-07-11 14:45:05 -06:00
Matt Farina
64496cdc07
Expose the resource types in addition to the api group/version in templates
Ported #5842 to Helm v3

Signed-off-by: Matt Farina <matt@mattfarina.com>
2019-07-01 13:58:32 -04:00
Adam Reese
b97f881be0
ref(*): use time.Duration for timeouts
Signed-off-by: Adam Reese <adam@reese.io>
2019-05-07 15:09:00 -07:00
Adam Reese
2dd4744d23
ref(pkg/kube): extract wait logic from install/update
This change adds a new method for waiting for kubernetes resources.

Signed-off-by: Adam Reese <adam@reese.io>
2019-05-07 12:29:11 -07:00
Adam Reese
b8bced2649
fix(pkg/action): load clients after flags have been parsed (#5681)
Signed-off-by: Adam Reese <adam@reese.io>
2019-05-07 12:02:07 -07:00
Adam Reese
895e9192d4
feat(*): use vanity import helm.sh/helm
Signed-off-by: Adam Reese <adam@reese.io>
2019-03-13 13:43:47 -07:00
Matthew Fisher
2571dbf82f
ref: remove pkg/helm, pkg/hapi, pkg/tiller
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2019-03-12 09:47:12 -07:00
Adam Reese
e51a9b90c9
Merge pull request #5284 from adamreese/v3/make-format
feat(Makefile): add formatting target
2019-02-14 23:40:50 -08:00
Martin Hickey
45fb4b1c44 Fix linter warnings
Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
2019-02-12 18:18:33 +00:00
Adam Reese
f791421fab
feat(Makefile): add formatting target
Signed-off-by: Adam Reese <adam@reese.io>
2019-02-08 12:24:47 -08:00
Matt Butcher
425f7a6f6c
feat: add 'pkg/action' for list operations (#5077)
* feat: add pkg/action to encapsulate action logic

Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>

* feat: replace client/server internals with action package

While we removed Tiller, we left the internal client/server architecture mostly intact. This replaces that architecture with the `pkg/action` package.

This implements the action package for list, but nothing else.

Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>

* feat: Add install and refactor some tests

This adds install to the action package, and then fixes up a lot of testing.

Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>

* fix: Move a bunch of sorters to the releaseutils package

Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>

* fix: updated APIs and fixed a failed test

Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>

* Use var for timestamper, instead of adding as a struct field

Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
2019-01-07 17:45:14 -07:00