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>
2 years ago
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>
2 years ago
Arvid E. Picciani
b9f347a574
fixes #11142 missing array length check on release
...
Signed-off-by: Arvid E. Picciani <arvid@kraud.cloud>
2 years ago
Timofey Kirillov
da8e7d2532
fix: "... has no deployed releases" error when release history contains only failed releases and history limit reached
...
Fixed old releases rotation procedure to not require a deployed release to exists.
An error will arise when there are no successfully deployed release yet, but releases history limit has been reached. In such situation helm will refuse to upgrade release anymore with "... has no deployed releases" error.
Furthermore, release rotation procedure already expecting lastDeployedRelease to be either nil, or not nil. So it is assumed that deployed release may exist or may not and these both outcomes were already expected as a valid situation rather than a failure.
Reworked storage_test.go TestStorageRemoveLeastRecentWithError test case: use mocked driver and test release creation procedure does not shadows errors from the underneath release rotation procedure.
Signed-off-by: Timofey Kirillov <timofey.kirillov@flant.com>
3 years ago
longkai
2deb641efd
fix(typo): fix typo of storage doc
...
Signed-off-by: longkai <im.longkai@gmail.com>
3 years ago
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
4 years ago
Adam Reese
db2aa1a8d6
fix(ci) update ci to use main branch
...
Signed-off-by: Adam Reese <adam@reese.io>
4 years ago
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>
4 years ago
Daniel Lipovetsky
00cf10d360
fix(pkg/storage): If storage.Create fails to clean up recent release versions, return an error
...
Previously, storage.Create was ignoring the error. This meant that a user that
relied on the recent release version cleanup would not be notified if that
cleanup failed, and release versions could grow without bound.
Closes #9145
Signed-off-by: Daniel Lipovetsky <dlipovetsky@d2iq.com>
4 years ago
Daniel Lipovetsky
8c28da6567
test(pkg/storage): Verify that storage.Create returns an error if it fails to clean up least-recent release versions
...
Signed-off-by: Daniel Lipovetsky <dlipovetsky@d2iq.com>
4 years ago
Mike Ng
3be333b73b
keep existing behavior of returning ErrReleaseNotFound when release(s) failed to decode
...
Signed-off-by: Mike Ng <ming@redhat.com>
4 years ago
Dmitry Chepurovskiy
09172b468a
Fix linting issues
...
Signed-off-by: Dmitry Chepurovskiy <dm3ch@dm3ch.net>
4 years ago
Dmitry Chepurovskiy
357a0785bc
Added selector filtering
...
Signed-off-by: Dmitry Chepurovskiy <dm3ch@dm3ch.net>
4 years ago
Dmitry Chepurovskiy
99bd709530
Pass labels from secret/configmap to release object
...
Signed-off-by: Dmitry Chepurovskiy <dm3ch@dm3ch.net>
4 years ago
Haoming Zhang
b6bbf34097
Close gzip reader when done.
...
Signed-off-by: Haoming Zhang <feicun1006@gmail.com>
4 years ago
Mike Ng
b86105aebc
fix(sql storage): Query() should return ErrReleaseNotFound immediately when no records are found
...
Signed-off-by: Mike Ng <ming@redhat.com>
5 years ago
zouyu
c6a00e63ef
Fix some go-lint warnings
...
Signed-off-by: zouyu <zouy.fnst@cn.fujitsu.com>
5 years ago
Matthew Morrissette
1911870958
fix(helm): allow a previously failed release to be upgraded ( #7653 )
...
Signed-off-by: Matt Morrissette <yinzara@gmail.com>
5 years ago
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>
5 years ago
Matt Farina
a3fa01ff8b
Merge pull request #7640 from yinzara/bugfix/issue-7002
...
fix(helm): stdin values for helm upgrade --install
5 years ago
Adam Reese
e1d046bc43
fix(tests): fix broken unit tests in storage ( #7928 )
5 years ago
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>
5 years ago
Eric Bailey
b9445616b5
fix(storage): preserve last deployed revision ( #7806 )
...
Signed-off-by: Eric Bailey <eric@ericb.me>
5 years ago
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>
5 years ago
tiendc
26830942d2
Fix a bug in Delete() in storage/driver/cfgmaps.go ( #7367 )
5 years ago
tiendc
06bc18c624
Fix a bug in storage/driver/secrets.go Delete() ( #7348 )
...
* Fix a bug in storage/driver/secrets.go
5 years ago
Zhou Hao
f5da6bd3d6
add unit test for RecordsReplace
...
Signed-off-by: Zhou Hao <zhouhao@cn.fujitsu.com>
5 years ago
Zhou Hao
ae508ebd1c
add unit test for ConfigMapDelete
...
Signed-off-by: Zhou Hao <zhouhao@cn.fujitsu.com>
5 years ago
Zhou Hao
95d7f36d41
add unit test for SecretDelete
...
Signed-off-by: Zhou Hao <zhouhao@cn.fujitsu.com>
5 years ago
Matt Morrissette
1ab52fa79c
fix(helm): stdin values for helm upgrade --install
...
Signed-off-by: Matt Morrissette <yinzara@gmail.com>
5 years ago
Zhou Hao
f1f661d4ca
pkg/storage/records: add unit test for Exists
...
Signed-off-by: Zhou Hao <zhouhao@cn.fujitsu.com>
5 years ago
Zhou Hao
c96aff6a43
pkg/storage/records: add unit test for Index
...
Signed-off-by: Zhou Hao <zhouhao@cn.fujitsu.com>
5 years ago
Zhou Hao
6b1eebd23a
pkg/storage/records: add unit test for Get
...
Signed-off-by: Zhou Hao <zhouhao@cn.fujitsu.com>
5 years ago
Matthew Fisher
8e1fc4bc6f
fix(memory_test): rebase master
...
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
5 years ago
Marc Khouzam
e6d2d10bad
fix(tests): Add namespace support to memory driver
...
Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>
5 years ago
Matthew Fisher
98962dce3f
Merge pull request #7349 from tiendc/unit_test_memory_list
...
Add unit test for List() of pkg/storage/driver/memory.go
5 years ago
Matt Farina
e3675e3312
Merge pull request #7358 from cristiklein/fix/deal-with-correupted-storage-v3
...
fix(helm): improve handling of corrupted storage
5 years ago
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>
5 years ago
Cristian Klein
1f0582cadc
fix(helm): improve handling of corrupted storage
...
Helm does not yet properly handle concurrent executions (see #7322 ),
and invoking Helm concurrently on the same release lead to corrupted storage.
Specifically, several Releases may be marked as DEPLOYED. This patch improved handling of such situations, by taking the latest
DEPLOYED Release. Eventually, the storage will clean itself out, after
the corrupted Releases are deleted due to --history-max.
This is a port to Helm v3 of #7319 .
Signed-off-by: Cristian Klein <cristian.klein@elastisys.com>
5 years ago
Simon Alling
e868cb23c0
ref(pkg/storage): Refactor Deployed and DeployedAll ( #7374 )
...
The error returned from DeployedAll will never contain "not found".
The error returned at the end of Deployed is already known to be nil,
and we never want to return ls[0] together with a non-nil error anyway.
Signed-off-by: Simon Alling <alling.simon@gmail.com>
5 years ago
Hu Shuai
de9118b879
Fix a typo "update" -> "updates" ( #7346 )
...
Signed-off-by: Hu Shuai <hus.fnst@cn.fujitsu.com>
5 years ago
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>
5 years ago
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>
5 years ago
Karuppiah Natarajan
bfd8250803
fix list not showing multiple releases with same name in different namespaces ( #6756 )
...
Signed-off-by: Karuppiah Natarajan <karuppiah7890@gmail.com>
5 years ago
Matt Farina
9bc7934f35
Updating the module for v3 as the major version
...
Signed-off-by: Matt Farina <matt@mattfarina.com>
5 years ago
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>
5 years ago
Adam Reese
b2d5e41fc7
ref(*): remove dead code
...
Signed-off-by: Adam Reese <adam@reese.io>
5 years ago
Adam Reese
895e9192d4
feat(*): use vanity import helm.sh/helm
...
Signed-off-by: Adam Reese <adam@reese.io>
6 years ago
Matthew Fisher
2571dbf82f
ref: remove pkg/helm, pkg/hapi, pkg/tiller
...
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
6 years ago
Adam Reese
e51a9b90c9
Merge pull request #5284 from adamreese/v3/make-format
...
feat(Makefile): add formatting target
6 years ago