Commit graph

164 commits

Author SHA1 Message Date
Trent V.
f9183a522a
Merge branch 'helm:main' into main 2024-10-08 03:23:44 -05:00
Nathan Baulch
ef85fa7f2d
Grammar fixes
Signed-off-by: Nathan Baulch <nathan.baulch@gmail.com>
2024-09-14 10:30:31 +10:00
Nathan Baulch
ff9dd262e3
Fix typos
Signed-off-by: Nathan Baulch <nathan.baulch@gmail.com>
2024-09-14 10:29:56 +10:00
Daniel Strobusch
90df4fa4d1
fix docs of DeployedAll
Signed-off-by: Daniel Strobusch <1847260+dastrobu@users.noreply.github.com>
2024-05-23 08:15:04 +02:00
Robert Sirchia
d58d7b3762 Fixing all the linting errors
Cleaned up all the linting errors we are getting.

Signed-off-by: Robert Sirchia <rsirchia@outlook.com>
2024-03-11 17:13:34 -04:00
Trenton VanderWert
ab640a7177
added sprintf solution and found other possible overflow occurences
Signed-off-by: Trenton VanderWert <trenton.vanderwert@gmail.com>
2024-02-08 23:51:21 -06:00
Trenton VanderWert
4a45342887
changed Iota to FormatInt to allow int64 value preventing 2038 overflow
Signed-off-by: Trenton VanderWert <trenton.vanderwert@gmail.com>
2024-02-08 10:45:38 -06:00
Matt Farina
847369c184
Update to Go 1.21 for builds
Noteis:
1. This moves golangci scanning to a GitHub action. This will
   enable inline pointers to issues in the PR where linting fails.
2. Go 1.21 is specified in the go.mod because Kubernetes libs
   require it.
3. The lint issues were removed. Some were fixed while others
   were handled by skipping linting or using _ as an argument.
   Many of these can be refactored later for better cleanup.

Signed-off-by: Matt Farina <matt.farina@suse.com>
2024-01-08 15:48:36 -05:00
Dmitry Chepurovskiy
250f0bd46e
Drop filterSystemLabels usage from Query method
Signed-off-by: Dmitry Chepurovskiy <me@dm3ch.net>
2023-10-13 20:48:26 +03:00
Dmitry Chepurovskiy
0ec47f8ec9
Apply review suggestions
Co-authored-by: French Ben <FrenchBen@users.noreply.github.com>
Signed-off-by: Dmitry Chepurovskiy <me@dm3ch.net>
2023-10-13 20:43:49 +03:00
Dmitry Chepurovskiy
e6d9b99255
Allow using label selectors for system labels for sql backend.
Fixes #12435

Signed-off-by: Dmitry Chepurovskiy <me@dm3ch.net>
2023-10-03 03:42:46 +03:00
Dmitry Chepurovskiy
e219c756e0
Allow using label selectors for system labels for secrets and configmap
backends.

Fixes #12435

Signed-off-by: Dmitry Chepurovskiy <me@dm3ch.net>
2023-10-03 03:17:40 +03:00
abrarcv170
4199be82b5
Increased release information key name max length.
Helm release names are limited to 53 characters. By default, Release information is stored in Kubernetes as secrets, and the secret's name structure follows the pattern "sh.helm.release.v1.<release name up to 53 characters>.v<release revision>." However, in the case of using an SQL backend, this release information key is stored in the release_v1 table, and the table constraint currently limits the key name length to 67 characters. This limitation may not be suitable for release names that are within Helm's 53-character limit and need to accommodate the additional "sh.helm.release.v1." prefix and the release revision suffix. 

Signed-off-by: abrarcv170 <78675575+abrarcv170@users.noreply.github.com>
2023-09-15 11:17:48 +05:30
Maxim Trofimov
4944acb341 fix conflict
Signed-off-by: Maxim Trofimov <qwerty65k@mail.ru>
2023-08-26 20:11:08 +03:00
Maxim Trofimov
6138e101aa add big tests
Signed-off-by: Maxim Trofimov <qwerty65k@mail.ru>
2023-08-26 20:09:28 +03:00
Maxim Trofimov
199784f711 fix conflict
Signed-off-by: Maxim Trofimov <qwerty65k@mail.ru>
2023-08-26 20:09:06 +03:00
Maxim Trofimov
b786cb40f0 fix
Signed-off-by: Maxim Trofimov <qwerty65k@mail.ru>
2023-08-26 20:05:50 +03:00
Maxim Trofimov
df5904d88a add check if all migrations already applied
Signed-off-by: Maxim Trofimov <qwerty65k@mail.ru>
2023-08-26 20:05:50 +03:00
Joe Julian
4ff7d90872
Merge remote-tracking branch 'upstream/main' into add-labels-to-install-upgrade 2023-08-23 10:42:16 -07:00
Dmitry Chepurovskiy
7b13ac9914
Added error in case try to supply custom label with name of system label during install/upgrade
Signed-off-by: Dmitry Chepurovskiy <me@dm3ch.net>
2023-07-25 17:55:05 +03: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
Dmitry Chepurovskiy
6853c3eab5
Merge remote-tracking branch 'origin/main' into add-labels-to-install-upgrade 2023-02-17 02:02:25 +02: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
Dmitry Chepurovskiy
28ab648d3c
Fix flaky TestSQLCreate test by making sqlmock ignore order of sql requests
Signed-off-by: Dmitry Chepurovskiy <me@dm3ch.net>
2022-06-17 21:36:48 +03:00
Dmitry Chepurovskiy
512970ab40
Fixing tests after adding labels to release fixture
Signed-off-by: Dmitry Chepurovskiy <dm3ch@dm3ch.net>
Signed-off-by: Dmitry Chepurovskiy <me@dm3ch.net>
2022-06-17 21:36:47 +03:00
Dmitry Chepurovskiy
2f29ccb9d0
Make default release fixture contain custom labels to make tests check that labels are not lost
Signed-off-by: Dmitry Chepurovskiy <dm3ch@dm3ch.net>
Signed-off-by: Dmitry Chepurovskiy <me@dm3ch.net>
2022-06-17 21:36:46 +03:00
Dmitry Chepurovskiy
68721de93d
Added support for storing custom labels in SQL storage driver
Fix list command for SQL storage driver

Fix SQL storage drivers tests after adding custom labels support

Remove notes that SQL driver not supported for storing labels in install and upgrade

Signed-off-by: Dmitry Chepurovskiy <dm3ch@dm3ch.net>
Signed-off-by: Dmitry Chepurovskiy <me@dm3ch.net>
2022-06-17 21:36:44 +03:00
Dmitry Chepurovskiy
083e66fe2b
Remove redudant types from util_test.go
Signed-off-by: Dmitry Chepurovskiy <dm3ch@dm3ch.net>
Signed-off-by: Dmitry Chepurovskiy <me@dm3ch.net>
2022-06-17 21:36:40 +03:00
Dmitry Chepurovskiy
3a2ed70bd3
Added tests for newly introduced util.go functions
Signed-off-by: Dmitry Chepurovskiy <dm3ch@dm3ch.net>
Signed-off-by: Dmitry Chepurovskiy <me@dm3ch.net>
2022-06-17 21:36:39 +03:00
Dmitry Chepurovskiy
c7eedbd9c5
Fix broken tests for SQL storage driver
Signed-off-by: Dmitry Chepurovskiy <dm3ch@dm3ch.net>
Signed-off-by: Dmitry Chepurovskiy <me@dm3ch.net>
2022-06-17 21:36:37 +03:00
Dmitry Chepurovskiy
95bb77c261
Fix broken tests for configmap and secret storage drivers
Signed-off-by: Dmitry Chepurovskiy <dm3ch@dm3ch.net>
Signed-off-by: Dmitry Chepurovskiy <me@dm3ch.net>
2022-06-17 21:36:36 +03:00
Dmitry Chepurovskiy
627ec6a0c6
Make superseded releases keep labels
Signed-off-by: Dmitry Chepurovskiy <dm3ch@dm3ch.net>
Signed-off-by: Dmitry Chepurovskiy <me@dm3ch.net>
2022-06-17 21:36:35 +03:00
Dmitry Chepurovskiy
ff3e55f655
Support configmap storage driver for install/upgrade actions --labels argument
Signed-off-by: Dmitry Chepurovskiy <dm3ch@dm3ch.net>
Signed-off-by: Dmitry Chepurovskiy <me@dm3ch.net>
2022-06-17 21:36:34 +03:00
Dmitry Chepurovskiy
6ef79e432b
Add labels support for install action with secret storage backend
Signed-off-by: Dmitry Chepurovskiy <dm3ch@dm3ch.net>
Signed-off-by: Dmitry Chepurovskiy <me@dm3ch.net>
2022-06-17 21:36:31 +03:00
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>
2022-03-31 10:22:42 +03:00
longkai
2deb641efd fix(typo): fix typo of storage doc
Signed-off-by: longkai <im.longkai@gmail.com>
2021-07-22 23:32:06 +08: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
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>
2020-12-18 15:10:01 -08:00
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>
2020-12-18 15:10:01 -08: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
zouyu
c6a00e63ef Fix some go-lint warnings
Signed-off-by: zouyu <zouy.fnst@cn.fujitsu.com>
2020-06-29 16:36:27 +08: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