Commit graph

1913 commits

Author SHA1 Message Date
Matthew Fisher
0941e3e345
Merge pull request #8613 from tariq1890/if-optimise
optimise if condition in service ready logic
2020-08-20 14:42:45 -07:00
Matthew Fisher
198f403688
Merge pull request #8590 from Foxboron/morten/fix-go1.15
release/mock: Ensure conversion from int to string yields a string
2020-08-20 08:07:04 -07:00
Tariq Ibrahim
b07b2589fb
optimise if condition in service ready logic
Signed-off-by: Tariq Ibrahim <tariq181290@gmail.com>
2020-08-18 21:59:48 -07:00
Matthew Fisher
bb33b9264f
Merge pull request #8507 from rajatjindal/fix-watch-timeout-error
fix watch error due to elb/proxy timeout
2020-08-14 10:17:33 -07:00
Martin Hickey
273d0364be
Merge pull request #8532 from dm3ch/labels-selector
Adding filtering of helm releases for configmap and secret backends during list command
2020-08-13 11:17:01 +01:00
Morten Linderud
83a5e620d0
release/mock: Ensure conversion from int to string yields a string
With the release of go 1.15, the test-suite doesn't pass as `go test` got
a new warning for improper `string(x)` usage.

https://golang.org/doc/go1.15#vet

    $ make test-unit
    # helm.sh/helm/v3/pkg/release
    pkg/release/mock.go:56:27: conversion from int to string yields a string of one rune, not a string of digits (did you mean fmt.Sprint(x)?)
    [snip]
    make: *** [Makefile:82: test-unit] Error 2

This patch changes ensures we are utilizing `fmt.Sprint` instead as
recommended.

Signed-off-by: Morten Linderud <morten@linderud.pw>
2020-08-12 23:04:02 +02:00
Martin Hickey
91094186eb
Merge pull request #8562 from andytom/chore/update_starter_chart
Update Common Lables template in starter chart
2020-08-11 12:29:04 +01:00
Thomas O'Donnell
4b1fa60d58 Update Common Lables template in starter chart
Have update the Common Labels template in the starter chart so that the
value for the `app.kubernetes.io/version` is set to the same value as
the image tag used in the deployment.

Signed-off-by: Thomas O'Donnell <andy.tom@gmail.com>
2020-08-10 15:44:53 +02:00
Martin Hickey
621c2020c6
Merge pull request #8505 from jiayushe/master
Avoid hardcoded container port in default notes
2020-08-06 15:24:26 +01:00
Martin Hickey
a5047b2f6c
Merge pull request #8438 from donggangcj/feature/support-jsonpath
feature(show): support jsonpath output for `helm show value`
2020-08-06 11:20:13 +01:00
Dong Gang
df4708a9de polish the error handler
Signed-off-by: Dong Gang <dong.gang@daocloud.io>
2020-08-05 10:37:00 +08:00
Dmitry Chepurovskiy
266c74f390
Move selector filtering after latest release version filtering
Signed-off-by: Dmitry Chepurovskiy <dm3ch@dm3ch.net>
2020-08-04 18:20:53 +03:00
Dmitry Chepurovskiy
2ea8f805b9
Added testing for list action with selector
Signed-off-by: Dmitry Chepurovskiy <dm3ch@dm3ch.net>
2020-08-04 18:18:50 +03: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
Dmitry Chepurovskiy
edc7d8ea32
Added selector option to list command
Signed-off-by: Dmitry Chepurovskiy <dm3ch@dm3ch.net>
2020-08-04 18:18:49 +03:00
Martin Hickey
4cc19d1d82 Fix typo
Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
2020-07-31 07:57:17 +00:00
Martin Hickey
37661a8089
Merge pull request #8282 from andrewmelis/list-history-filter
Make helm ls return only current releases if providing state filter
2020-07-30 12:47:28 +01:00
Matt Farina
44212f83dc
Fix issue with install and upgrade running all hooks
When #8156 was merged it had the side effect that all hooks were
run all the time. All the hooks were put in the flow of the
content rendered and sent to Kubernetes on every command.

For example, if you ran the following 2 commands the test hooks
would run:

    helm create foo
    helm install foo ./foo

This should not run any hooks. But, the generated test hook is run.

The change in this commit moves the writing of the hooks to output
or disk back into the template command rather than in a private
function within the actions. This is where it was for v3.2.

One side effect is that post renderers will not work on hooks. This
was the case in v3.2. Since this bug is blocking the release of v3.3.0
it is being rolled back. A refactor effort is underway for this section
of code. post renderer for hooks should be added back as part of that
work. Since post renderer hooks did not make it into a release it
is ok to roll it back for now.

There is code in the cmd/helm package that has been duplicated from
pkg/action. This is a temporary measure to fix the immediate bug
with plans to correct the situation as part of a refactor
of renderResources.

Signed-off-by: Matt Farina <matt@mattfarina.com>
2020-07-28 09:52:39 -04: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
Rajat Jindal
4faeedd98b fix watch error due to elb/proxy timeout
Signed-off-by: Rajat Jindal <rajatjindal83@gmail.com>
2020-07-23 12:04:54 +05:30
She Jiayu
d141593d83 Avoid hardcoded container port in default notes
Signed-off-by: She Jiayu <shejiayu1998@qq.com>
2020-07-23 12:43:45 +08:00
Matt Farina
25f67f74ee
Restoring Build behavior
Two things changed in this commit...

1. The Build behavior was restored and the change only impacts
   Update. This is a more minimal functionality change thats
   a more secure behavior
2. Cleanup from Josh's feedback on the PR to create a const
   and comment changes

Signed-off-by: Matt Farina <matt@mattfarina.com>
2020-07-22 15:51:27 -04:00
Matt Farina
1458113696
Adding helm v4 todo
Signed-off-by: Matt Farina <matt@mattfarina.com>
2020-07-22 15:47:49 -04:00
Matt Farina
9cb90a8b23
Make unmanaged repositories version resolvable
If a repository was not know to helm (e.g. added using helm repo add)
then Helm would use the range set in the depenencies as the version
in the lock file. Lock files should not have ranges since they are
locked to versions.

Helm did this because the version information for repositories was
not know to Helm. This change fixes that by making the repository
and chart information known to Helm so it can resolve the versions.

Closes #8449

Signed-off-by: Matt Farina <matt@mattfarina.com>
2020-07-22 15:47:48 -04:00
Andrew Melis
f9d35242d0 Enhance readability by extracting bitwise operation
Fixes https://github.com/helm/helm/pull/8282#discussion_r458368780

Signed-off-by: Andrew Melis <andrewmelis@gmail.com>
2020-07-22 12:23:44 -04:00
Holder
ffc3d42f87
fix(sdk): Polish the downloader/manager package error return (#8491)
* fix(sdk): Polish the downloader/manager package error return

Close #8471

Signed-off-by: Dong Gang <dong.gang@daocloud.io>

* Modify the repositories validation function `resloveRepoNames` and add a
unit test.

Signed-off-by: Dong Gang <dong.gang@daocloud.io>

* Remove wrong commit

Signed-off-by: Dong Gang <dong.gang@daocloud.io>
2020-07-22 10:03:25 -05:00
Matt Farina
6a536661fc
Merge pull request #8462 from donggangcj/master
fix(create): update the hook name of test-connection pod
2020-07-16 09:21:51 -04:00
Martin Hickey
ae8fcf445d
Merge pull request #8425 from wawa0210/feature-8370
Rollback command support for max history
2020-07-16 12:10:02 +01:00
Dong Gang
9777925a2a fix(create): update the hook name of test-connection pod
Signed-off-by: Dong Gang <dong.gang@daocloud.io>
2020-07-16 09:10:03 +08:00
Matt Farina
a2d11c9288
Merge pull request #8444 from bridgetkromhout/capabilities
Fixing version and spelling errors
2020-07-14 11:51:59 -04:00
wawa0210
4be3804c50
Rollback command support for max history
Signed-off-by: wawa0210 <xiaozhang0210@hotmail.com>
2020-07-14 07:56:17 +08:00
Cristian Klein
20fb7bac4e fix(helm): Added test for concurrent upgrades
Signed-off-by: Cristian Klein <cristian.klein@elastisys.com>
2020-07-13 22:54:52 +02:00
Cristian Klein
9a4f4ec64b fix(helm): Avoid corrupting storage via a lock
If two `helm upgrade`s are executed at the exact same time, then one of
the invocations will fail with "already exists".

If one `helm upgrade` is executed and a second one is started while the
first is in `pending-upgrade`, then the second invocation will create a
new release. Effectively, two helm invocations will simultaneously
change the state of Kubernetes resources -- which is scary -- then two
releases will be in `deployed` state -- which can cause other issues.

This commit fixes the corrupted storage problem, by introducting a poor
person's lock. If the last release is in a pending state, then helm will
abort. If the last release is in a pending state, due to a previously
killed helm, then the user is expected to do `helm rollback`.

Closes #7274

Signed-off-by: Cristian Klein <cristian.klein@elastisys.com>
2020-07-13 22:54:52 +02:00
Bridget Kromhout
5684c86490
Fixing version and spelling errors
Signed-off-by: Bridget Kromhout <bridget@kromhout.org>
2020-07-13 15:37:12 -05:00
Dong Gang
1dfe66aa85 fix the code style error
Signed-off-by: Dong Gang <dong.gang@daocloud.io>
2020-07-13 19:11:40 +08:00
Dong Gang
57bd8a71b0 feature(show): support jsonpath output for helm show value
Signed-off-by: Dong Gang <dong.gang@daocloud.io>
2020-07-13 18:59:09 +08:00
Hidde Beydals
8217aba4a6 fix(kube): use logger instead of fmt.Printf
Signed-off-by: Hidde Beydals <hello@hidde.co>
2020-07-13 10:59:00 +02:00
Matt Butcher
2750e4d781
Lint dependencies (#7970)
* feat: add dependency tests

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

* replaced on-disk fixtures with in-memory fixtures

Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
2020-07-09 14:31:51 -06:00
wawa0210
637a5c6494 Environment variable for setting the max history for an environment
Signed-off-by: wawa0210 <xiaozhang0210@hotmail.com>
2020-07-08 23:02:40 +08:00
Matthew Fisher
3c9099290b
Merge pull request #7184 from zwwhdls/fix6116
fix stack overflow error in helm template.
2020-07-07 11:19:02 -07:00
Matthew Fisher
fc4a11c131
bump version to v3.3
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
(cherry picked from commit 5c2dfaad84)
2020-07-07 10:40:09 -07:00
Matthew Fisher
d61aaf3fd7
Merge pull request #7235 from karuppiah7890/fix-lint
Show errors when linting for Chart.yaml version and appVersion fields of type non-string
2020-07-07 10:01:16 -07:00
Matthew Fisher
fc6d6d3605
Merge pull request #6979 from lindhe/explain_revision_version_in_get
Add comments about release Version variable
2020-07-07 09:20:45 -07:00
Matthew Fisher
e7ab975112
Merge pull request #8142 from technosophos/feat/1990-match-labels-lint
feat: Detect missing selector during lint
2020-07-07 08:48:24 -07:00
DongGang
ceff32d5f8
fix(template):Issue:helm template with --output-dir (#8156)
* fix(template):Issue:helm template with --output-dir doesn't write template with a hook to file

Close #7836

Signed-off-by: Dong Gang <dong.gang@daocloud.io>

* fix go file style

Signed-off-by: Dong Gang <dong.gang@daocloud.io>

* fix go file style

Signed-off-by: Dong Gang <dong.gang@daocloud.io>
2020-07-07 08:44:22 -07:00
zwwhdls
d58a984878 fix conflict
Signed-off-by: zwwhdls <zwwhdls@hotmail.com>
2020-07-01 21:38:44 +08:00
zwwhdls
1b39857ac3 add test case
Signed-off-by: zwwhdls <zwwhdls@hotmail.com>
2020-07-01 20:34:13 +08:00
zwwhdls
4532485fd0 fix another extreme case
Signed-off-by: zwwhdls <zwwhdls@hotmail.com>
2020-07-01 20:34:13 +08:00