Dmitry Chepurovskiy
250f0bd46e
Drop filterSystemLabels usage from Query method
...
Signed-off-by: Dmitry Chepurovskiy <me@dm3ch.net>
11 months ago
Dmitry Chepurovskiy
0ec47f8ec9
Apply review suggestions
...
Co-authored-by: French Ben <FrenchBen@users.noreply.github.com>
Signed-off-by: Dmitry Chepurovskiy <me@dm3ch.net>
11 months ago
Dmitry Chepurovskiy
e6d9b99255
Allow using label selectors for system labels for sql backend.
...
Fixes #12435
Signed-off-by: Dmitry Chepurovskiy <me@dm3ch.net>
11 months ago
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>
11 months ago
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>
11 months ago
Maxim Trofimov
4944acb341
fix conflict
...
Signed-off-by: Maxim Trofimov <qwerty65k@mail.ru>
1 year ago
Maxim Trofimov
6138e101aa
add big tests
...
Signed-off-by: Maxim Trofimov <qwerty65k@mail.ru>
1 year ago
Maxim Trofimov
199784f711
fix conflict
...
Signed-off-by: Maxim Trofimov <qwerty65k@mail.ru>
1 year ago
Maxim Trofimov
b786cb40f0
fix
...
Signed-off-by: Maxim Trofimov <qwerty65k@mail.ru>
1 year ago
Maxim Trofimov
df5904d88a
add check if all migrations already applied
...
Signed-off-by: Maxim Trofimov <qwerty65k@mail.ru>
1 year ago
Joe Julian
4ff7d90872
Merge remote-tracking branch 'upstream/main' into add-labels-to-install-upgrade
1 year ago
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>
1 year ago
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>
1 year 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>
1 year ago
Dmitry Chepurovskiy
6853c3eab5
Merge remote-tracking branch 'origin/main' into add-labels-to-install-upgrade
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
Dmitry Chepurovskiy
28ab648d3c
Fix flaky TestSQLCreate test by making sqlmock ignore order of sql requests
...
Signed-off-by: Dmitry Chepurovskiy <me@dm3ch.net>
2 years ago
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>
2 years ago
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>
2 years ago
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>
2 years ago
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>
2 years ago
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>
2 years ago
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>
2 years ago
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>
2 years ago
Dmitry Chepurovskiy
627ec6a0c6
Make superseded releases keep labels
...
Signed-off-by: Dmitry Chepurovskiy <dm3ch@dm3ch.net>
Signed-off-by: Dmitry Chepurovskiy <me@dm3ch.net>
2 years ago
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>
2 years ago
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>
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>
2 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
3 years ago
Adam Reese
db2aa1a8d6
fix(ci) update ci to use main branch
...
Signed-off-by: Adam Reese <adam@reese.io>
3 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>
3 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>
4 years ago
zouyu
c6a00e63ef
Fix some go-lint warnings
...
Signed-off-by: zouyu <zouy.fnst@cn.fujitsu.com>
4 years ago
Matthew Morrissette
1911870958
fix(helm): allow a previously failed release to be upgraded ( #7653 )
...
Signed-off-by: Matt Morrissette <yinzara@gmail.com>
4 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>
4 years ago
Matt Farina
a3fa01ff8b
Merge pull request #7640 from yinzara/bugfix/issue-7002
...
fix(helm): stdin values for helm upgrade --install
4 years ago
Adam Reese
e1d046bc43
fix(tests): fix broken unit tests in storage ( #7928 )
4 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>
4 years ago
Eric Bailey
b9445616b5
fix(storage): preserve last deployed revision ( #7806 )
...
Signed-off-by: Eric Bailey <eric@ericb.me>
4 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>
4 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