Commit graph

97 commits

Author SHA1 Message Date
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
Arvid E. Picciani
b9f347a574 fixes #11142 missing array length check on release
Signed-off-by: Arvid E. Picciani <arvid@kraud.cloud>
2022-07-13 11:26:04 +02:00
Martin Hickey
ed7b6c4761
Merge pull request #8470 from mikeshng/sql-query-fix
fix(sql storage): Query() should return ErrReleaseNotFound immediately when no records are found
2021-06-09 14:23:53 +01:00
Adam Reese
db2aa1a8d6
fix(ci) update ci to use main branch
Signed-off-by: Adam Reese <adam@reese.io>
2021-04-01 11:26:44 -07:00
Josh Soref
2bf8fdf45d
chore: Spelling (#9410)
* spelling: annotate

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: asserts

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: behavior

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: binary

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: contain

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: copied

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: dependency

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: depending

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: deprecated

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: doesn't

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: donot

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: github

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: inputting

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: iteration

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: jabberwocky

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: kubernetes

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: length

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: mismatch

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: multiple

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: nonexistent

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: outputs

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: panicking

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: plugins

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: parsing

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: porthos

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: regular

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: resource

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: repositories

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: something

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: strict

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: string

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: unknown

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2021-03-15 21:11:57 -04:00
Mike Ng
3be333b73b keep existing behavior of returning ErrReleaseNotFound when release(s) failed to decode
Signed-off-by: Mike Ng <ming@redhat.com>
2020-09-23 12:55:38 -04:00
Dmitry Chepurovskiy
09172b468a
Fix linting issues
Signed-off-by: Dmitry Chepurovskiy <dm3ch@dm3ch.net>
2020-08-04 18:18:50 +03:00
Dmitry Chepurovskiy
357a0785bc
Added selector filtering
Signed-off-by: Dmitry Chepurovskiy <dm3ch@dm3ch.net>
2020-08-04 18:18:50 +03:00
Dmitry Chepurovskiy
99bd709530
Pass labels from secret/configmap to release object
Signed-off-by: Dmitry Chepurovskiy <dm3ch@dm3ch.net>
2020-08-04 18:18:50 +03:00
Haoming Zhang
b6bbf34097
Close gzip reader when done.
Signed-off-by: Haoming Zhang <feicun1006@gmail.com>
2020-07-23 21:04:18 -07:00
Mike Ng
b86105aebc fix(sql storage): Query() should return ErrReleaseNotFound immediately when no records are found
Signed-off-by: Mike Ng <ming@redhat.com>
2020-07-16 13:58:14 -04:00
Matthew Morrissette
1911870958
fix(helm): allow a previously failed release to be upgraded (#7653)
Signed-off-by: Matt Morrissette <yinzara@gmail.com>
2020-04-17 11:56:29 -06:00
Elliot Maincourt
21d2aa7f2b
Migrate SQL storage driver to Helm 3 (#7635)
* Migrate SQL storage driver to Helm 3

Signed-off-by: Elliot Maincourt <e.maincourt@gmail.com>

* Update pkg/storage/driver/sql.go

Co-Authored-By: Sebastian Pöhn <sebastian.poehn@gmail.com>
Signed-off-by: Elliot Maincourt <e.maincourt@gmail.com>

* Add authentication to releases_v3

Signed-off-by: Elliot Maincourt <e.maincourt@gmail.com>

* Fix migration

Signed-off-by: Elliot Maincourt <e.maincourt@gmail.com>

* Template the init migration

Signed-off-by: Elliot Maincourt <e.maincourt@gmail.com>

* Prevent potential SQL injection

Signed-off-by: Elliot Maincourt <e.maincourt@gmail.com>

* Use an SQL querybuilder

Signed-off-by: Elliot Maincourt <e.maincourt@gmail.com>

* Remove references to HELM_DRIVER_SQL_DIALECT

Signed-off-by: Elliot Maincourt <e.maincourt@gmail.com>

Co-authored-by: Sebastian Pöhn <sebastian.poehn@gmail.com>
Co-authored-by: Matt Butcher <matt.butcher@microsoft.com>
2020-04-16 14:53:40 -06:00
Matt Farina
a3fa01ff8b
Merge pull request #7640 from yinzara/bugfix/issue-7002
fix(helm): stdin values for helm upgrade --install
2020-04-15 13:16:36 -04:00
Adam Reese
e1d046bc43
fix(tests): fix broken unit tests in storage (#7928) 2020-04-14 21:34:08 -07:00
Lu Fengqi
9e1f381bf2
Add unit test for Secrets/ConfigMaps (#7765)
* test(pkg/storage/secrets): make MockSecretsInterface.List follow ListOptions

Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com>

* test(pkg/storage/secrets): add unit test for Secrets.Query

Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com>

* test(pkg/storage/cfgmaps): make MockConfigMapsInterface.List follow ListOptions

Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com>

* test(pkg/storage/cfgmaps): add unit test for ConfigMaps.Query

Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
2020-04-14 20:07:02 -06:00
Adam Reese
c2da4fd53d
ref(*): kubernetes v1.18 (#7831)
Upgrade Kubernetes libraries to v0.18.0

Add new lazy load KubernetesClientSet to avoid missing kubeconfig error

In kubernetes v1.18 kubeconfig validation was added.  Minikube and Kind
both remove kubeconfig when stopping clusters.  This causes and error
when running any helm commands because we initialize the client before
executing the command.

Signed-off-by: Adam Reese <adam@reese.io>
2020-04-13 08:40:38 -07:00
tiendc
26830942d2
Fix a bug in Delete() in storage/driver/cfgmaps.go (#7367) 2020-03-13 11:36:14 -07:00
tiendc
06bc18c624
Fix a bug in storage/driver/secrets.go Delete() (#7348)
* Fix a bug in storage/driver/secrets.go
2020-03-13 11:35:39 -07:00
Zhou Hao
f5da6bd3d6 add unit test for RecordsReplace
Signed-off-by: Zhou Hao <zhouhao@cn.fujitsu.com>
2020-03-02 14:32:57 +08:00
Zhou Hao
ae508ebd1c add unit test for ConfigMapDelete
Signed-off-by: Zhou Hao <zhouhao@cn.fujitsu.com>
2020-03-02 14:14:04 +08:00
Zhou Hao
95d7f36d41 add unit test for SecretDelete
Signed-off-by: Zhou Hao <zhouhao@cn.fujitsu.com>
2020-03-02 13:39:58 +08:00
Matt Morrissette
1ab52fa79c
fix(helm): stdin values for helm upgrade --install
Signed-off-by: Matt Morrissette <yinzara@gmail.com>
2020-02-27 11:07:02 -05:00
Zhou Hao
f1f661d4ca pkg/storage/records: add unit test for Exists
Signed-off-by: Zhou Hao <zhouhao@cn.fujitsu.com>
2020-02-24 11:53:04 +08:00
Zhou Hao
c96aff6a43 pkg/storage/records: add unit test for Index
Signed-off-by: Zhou Hao <zhouhao@cn.fujitsu.com>
2020-02-24 11:42:04 +08:00
Zhou Hao
6b1eebd23a pkg/storage/records: add unit test for Get
Signed-off-by: Zhou Hao <zhouhao@cn.fujitsu.com>
2020-02-24 11:28:14 +08:00
Matthew Fisher
8e1fc4bc6f
fix(memory_test): rebase master
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2020-02-07 09:25:23 -08:00
Marc Khouzam
e6d2d10bad fix(tests): Add namespace support to memory driver
Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>
2020-02-07 11:41:47 -05:00
Matthew Fisher
98962dce3f
Merge pull request #7349 from tiendc/unit_test_memory_list
Add unit test for List() of pkg/storage/driver/memory.go
2020-02-07 08:30:39 -08:00
Martin Hickey
88f42929d7
Remove references to protobuf (#7425)
Remove references to protobuf and update description of release
object stored representation to Helm v3.

Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
2020-01-17 15:56:56 +00:00
Dao Cong Tien
476ffaea8c Add unit test for List() of pkg/storage/driver/memory.go
Signed-off-by: Dao Cong Tien <tiendc@vn.fujitsu.com>
2020-01-08 15:43:57 +07:00
Josh Soref
02ad2b1187 Spelling (#7258)
* spelling: constraint

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: cryptographic

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: dependency

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: doesnot

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: don't

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: unexpected

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: dreadnought

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: default

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: envvars

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: evaluates

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: execute

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: extractor

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: frobnitz

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: generated

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: implementation

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: jabba

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: keywords

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: kubernetes

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: override

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: package

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: parsable

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: progress

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: recursively

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: release

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: cache

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: representing

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: serializer

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: subchart

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: utilities

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2019-12-18 12:04:08 +00:00
Karuppiah Natarajan
bfd8250803 fix list not showing multiple releases with same name in different namespaces (#6756)
Signed-off-by: Karuppiah Natarajan <karuppiah7890@gmail.com>
2019-10-24 14:34:48 +01: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
Martin Hickey
caa26c4bb2
Change release storage name to use helm storage type as prefix (#6500)
* Change release storage name to prefix helm storage type

Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>

* Add comments about the Kubernetes storage object type field content

Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
2019-09-26 17:46:19 +01:00
Adam Reese
b2d5e41fc7
ref(*): remove dead code
Signed-off-by: Adam Reese <adam@reese.io>
2019-08-19 10:22:27 -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
Adam Reese
3be0d81da7
ref(driver): refactor out function type errors
Signed-off-by: Adam Reese <adam@reese.io>
2018-09-10 20:20:32 -07:00
Adam Reese
4f26b658d8
change copyright to "Copyright The Helm Authors" 2018-08-24 12:03:55 -07:00
Matthew Fisher
195d21d5d7
ref(cmd): rename helm delete to helm uninstall
To match the convention of `helm install`, `helm uninstall` is the inverse.

Other tangential changes in this PR:

- StatusDeleting has been changed to StatusUninstalling
- StatusDeleted has been changed to StatusUninstalled
- `helm list --deleted` has been changed to `helm list --uninstalled`
- `helm list --deleting` has been changed to `helm list --uninstalling`
- `helm.DeleteOption` and all delete options have been renamed to `helm.UninstallOption`

I have not made any changes to the "helm.sh/hook-delete-policy", "pre-delete" and "post-delete" hook annotations because

1. it's a major breaking change to existing helm charts, which we've commited to NOT break in Helm 3
2. there is no "helm.sh/hook-install-policy" to pair with "helm.sh/hook-uninstall-policy", so delete still makes sense here

`helm delete` and `helm del` have been added as aliases to `helm uninstall`, so `helm delete` and `helm del` still works as is.
2018-06-14 15:46:00 -07:00
Adam Reese
b1128abf4f
ref(*): s/tiller/helm/ 2018-05-10 09:41:31 -07:00
Adam Reese
726e3c41be
feat(*): print stacktrace on error with debug enabled 2018-05-10 09:34:41 -07:00
Adam Reese
3b9596c6ab
ref(*): convert const types to strings 2018-04-26 16:52:31 -07:00
Adam Reese
19398a2ef1
feat(*): store release History in same namespace as release
https://github.com/kubernetes-helm/community/blob/master/helm-v3/003-state.md#namespacing-changes
2018-04-23 09:48:07 -07:00
Adam Reese
c5a76deba3
ref(*): use go conventions for naming types 2018-04-19 11:12:46 -07:00