Commit Graph
2206 Commits
Author SHA1 Message Date
Jerome Küttner 9a492f8240 Channel should remain open if there is still a routine that wants to write into it
Signed-off-by: Jerome Küttner <j.kuettner@mittwald.de>
2021-12-06 18:07:47 +01:00
Jerome Küttner ad3d2cc8ef Fix memory leak in upgrade action
fixes helm/helm#10439

Signed-off-by: Jerome Küttner <j.kuettner@mittwald.de>
2021-12-06 17:54:46 +01:00
Matthew Fisher 5d47255a3d Merge pull request #10230 from yxxhero/fix_sdk_namespace_issue
add SetNamespace method for EnvSettings, in order to set namespace in helm sdk
2021-11-26 09:18:29 -08:00
Matthew Fisher 67f92d63fa Merge pull request #9640 from wangchenglong01/wangchl01
Add error check to avoid panic
2021-11-26 08:55:57 -08:00
Matthew Fisher a8d33e7df4 Merge pull request #9918 from cndoit18/fix-issue-9915
fix(install): fix 9915
2021-11-26 08:47:31 -08:00
Bhavin Gandhi c3310bb724 fix(pkg/kube): statefulSetReady: handle partition cases correctly
The partition value can be greater than number of replicas, in that
case no pods are rolled out. The expectedReplicas becomes a negative
number.
https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#partitions

In the cases where the update does not change anything in the pod
template, the updatedReplicas value from StatefulSet status remains
unchanged. Such updates can still set some partition value, and
UpdatedReplicas is always greater than expectedReplicas. Basically,
the StatefulSet is ready / rolled-out.

In both the above scenarios, providing `--wait` flag causes it to
timeout waiting indefinitely. Because updatedReplicas can never be
negative, or be equal to the expectedReplicas for the second case.

This commit handles both the scenarios by checking if UpdatedReplicas
is smaller than expectedReplicas. If it is, then the StatefulSet is
not ready yet.

Based on the code from kubectl rollout:
https://github.com/kubernetes/kubectl/blob/a450ebd59c1e8917df23d37c6f05d8e16c3746aa/pkg/polymorphichelpers/rollout_status.go#L138-L141

Closes #8674

Signed-off-by: Bhavin Gandhi <bhavin7392@gmail.com>
2021-11-26 19:06:25 +05:30
Tyler AuerbeckandTyler Auerbeck 4bf99e54eb Update HELM_PLUGIN_SELF -> HELM_PLUGIN_DIR (#10380)
* Update HELM_PLUGIN_SELF -> HELM_PLUGIN_DIR

Signed-off-by: Tyler Auerbeck <tylerauerbeck@users.noreply.github.com>

* Trigger Build

Signed-off-by: Tyler Auerbeck <tylerauerbeck@users.noreply.github.com>

Co-authored-by: Tyler Auerbeck <tylerauerbeck@users.noreply.github.com>
2021-11-25 23:50:53 -08:00
Matt Farina 7838fb769d Fix specifying of Kubernetes version from build scripts
This bug came about because of three issues that this change
corrects:
- The CI scripts run on a pull request did not test building
  Helm. This means that a failure to set a variable using LDFLAGS
  had no opportunity to be caught.
- #8608 provided a means to match the k8s version used in linting
  and chartutil with the version of the package we pull in. With
  one problem. It attempts to set a const as if it were a string.
  This is ignored and everyone missed it.
- #10325 moved those constants to vars so it could be set. This
  looked good and passed tests but missed that you can't set an
  int as if it were a string. See first bullet.

This change fixes this by moved the internal representation to
be a string. These are internal variables not exposed in the public
API which makes this change non-breaking to the API.

Closes #10367

Signed-off-by: Matt Farina <matt.farina@suse.com>
2021-11-18 11:48:02 -05:00
Matt Farina 6809070032 Merge pull request #10325 from sboschman/lint-with-ldflags
allow ldflags to overwrite k8s version
2021-11-17 13:17:32 -05:00
Josh Dolitsky 889c70b729 Add nolint comments
Signed-off-by: Josh Dolitsky <josh@dolit.ski>
2021-11-16 12:13:39 -05:00
Martin Hickey ea1b1f5a07 Use buffered channel for signal notification
Refer to https://pkg.go.dev/os/signal#Notify for more details.

Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
2021-11-16 15:42:48 +00:00
Timofey Kirillov 7f68bfa1fa fix: added resource info into the validation error
Signed-off-by: Timofey Kirillov <timofey.kirillov@flant.com>
2021-11-12 19:00:43 +03:00
Sverre Boschman 81a373ead5 allow ldflags to overwrite k8s version
Signed-off-by: Sverre Boschman <1142569+sboschman@users.noreply.github.com>
2021-11-09 14:18:07 +01:00
Martin Hickey 1278306509 Merge pull request #10271 from stuartdrennan/lint-values-dependencies
fix(helm): process  dependencies import-values
2021-11-08 18:47:21 +00:00
Guangwen Feng 9b7a45a384 Fix a golint issue caused by typo
Signed-off-by: Guangwen Feng <fenggw-fnst@cn.fujitsu.com>
2021-11-01 17:39:58 +08:00
Asir Tamboli ea49d811bf Updated oci format logic
Signed-off-by: Asir Tamboli <tamboliasir1@gmail.com>
2021-10-29 06:28:38 +05:30
Stuart Drennan 1931b0702d fix(helm): process dependencies import-values
When running helm lint, import-values for dependencies are ignored,
also added test for linting chart with import-values

Closes #9658

Signed-off-by: Stuart Drennan <stuart.drennan@gmail.com>
2021-10-24 11:38:02 +01:00
yxxhero 0d3289eb0b add unittest for SetNamespace method
Signed-off-by: yxxhero <aiopsclub@163.com>
2021-10-08 23:02:29 +08:00
yxxhero d376a67ba8 add SetNamespace method for EnvSettings, in order to set namespace in helm sdk
Signed-off-by: yxxhero <aiopsclub@163.com>
2021-10-08 22:40:04 +08:00
Alexey Igrychev 5753f61ae3 docs: fix typo Charts.yaml
Signed-off-by: Alexey Igrychev <alexey.igrychev@flant.com>
2021-10-07 16:50:25 +01:00
Fabian Jucker 6f0064d61b actually skip unverifiable files
Signed-off-by: Fabian Jucker <fabianju@gmx.ch>
2021-10-06 17:31:00 +02:00
Damien Nozay 9fa373e8be Make validation errors easier to fix
Problem: the warnings don't give enough details about which
values are problematic, only the name of the leaf key. This is
all the more annoying when you have a chart depending on other charts.

```
mainchart
 |
 +- subchart1
 +- subchart2
 +- subchart3
```

Here are some warnings I get before the change:
```
coalesce.go:199: warning: destination for credentials is a table. Ignoring non-table value
coalesce.go:160: warning: skipped value for resources: Not a table.
coalesce.go:160: warning: skipped value for googleSheetsServiceAccount: Not a table.
coalesce.go:199: warning: destination for googleSheetsServiceAccount is a table. Ignoring non-table value
coalesce.go:199: warning: destination for resources is a table. Ignoring non-table value []
coalesce.go:199: warning: destination for credentials is a table. Ignoring non-table value
coalesce.go:199: warning: destination for credentials is a table. Ignoring non-table value
coalesce.go:160: warning: skipped value for resources: Not a table.
coalesce.go:160: warning: skipped value for googleSheetsServiceAccount: Not a table.
```

with fix:
```
coalesce.go:162: warning: skipped value for subchart1.resources: Not a table.
coalesce.go:162: warning: skipped value for subchart2.googleSheetsServiceAccount: Not a table.
coalesce.go:211: warning: destination for subchart3.aws.credentials is a table. Ignoring non-table value ()
coalesce.go:211: warning: destination for mainchart.subchart3.aws.credentials is a table. Ignoring non-table value ()
coalesce.go:211: warning: destination for mainchart.subchart2.googleSheetsServiceAccount is a table. Ignoring non-table value ()
coalesce.go:211: warning: destination for mainchart.subchart1.resources is a table. Ignoring non-table value ([])
coalesce.go:162: warning: skipped value for subchart1.resources: Not a table.
coalesce.go:162: warning: skipped value for subchart2.googleSheetsServiceAccount: Not a table.
coalesce.go:211: warning: destination for subchart3.aws.credentials is a table. Ignoring non-table value ()
```

Signed-off-by: Damien Nozay <damiennozay+github@gmail.com>

add tests

Signed-off-by: Damien Nozay <damiennozay+github@gmail.com>
2021-09-09 11:47:00 -07:00
Matthew Fisher d2dd32470b fix tarFromLocalDir saving file dependencies in dest path
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2021-09-09 08:52:02 -07:00
Matt Farina 7d13cd5ca1 Merge pull request #10081 from mattfarina/bump-version-3.7
bump version to 3.7
2021-09-07 09:16:47 -04:00
cndoit18 da15d96a68 fix(install): if subcharts are disabled, the CRD for subcharts should not be installed
Signed-off-by: cndoit18 <cndoit18@outlook.com>
2021-09-01 13:57:46 +08:00
Matt Farina f895948ae2 Fixing issue with non-existant .Template when using tpl function
This is a regression accidently introduced in #9957.

A delete call had been used on the Template key of vals. This caused
a condition where Template was not available when rendering via tpl.
The delete happened after ExecuteTemplate so the issue is surpsising.
It may possibly be a race condition. Existing tests did not catch it.
I tried to create a test that directly tested the issue and was
unable to replicate the error seen with real charts. This leads me
to believe it is a race condition in the underlying Go template
package.

The delete call was not there before #9957. It should be safe to
remove and keep that information.

Closes #10082

Signed-off-by: Matt Farina <matt.farina@suse.com>
2021-08-31 10:19:54 -04:00
Matt Farina e6a92c4b62 bump version to 3.7
Signed-off-by: Matt Farina <matt.farina@suse.com>
(cherry picked from commit 7048ef6b30aa23abdcfcaf523cb4c42dff85add9)
2021-08-30 22:06:54 -04:00
Matt Farina accf82ba1c Merge pull request #9180 from Moser-ss/feature-handle-SIGINT
Handle SIGTERMs during helm upgrade and helm install
2021-08-30 18:18:13 -04:00
Matt Farina 2062a59566 Merge pull request #9702 from mikeshng/uninstall-wait
feat: add optional boolean '--wait' flag to 'uninstall' command.
2021-08-30 17:43:50 -04:00
Josh Dolitsky caa97158d0 Revert moving registry actions back to pkg/
Signed-off-by: Josh Dolitsky <josh@dolit.ski>
2021-08-30 15:54:42 -04:00
Josh Dolitsky bf9c9b45a8 Merge branch 'main' of github.com:helm/helm into hip-6
Signed-off-by: Josh Dolitsky <josh@dolit.ski>
2021-08-30 15:48:48 -04:00
Martin Hickey c3ad0c7242 Merge pull request #9333 from bgutjahr/fix-9332
Fix 9332
2021-08-30 16:44:37 +01:00
Josh Dolitsky 77750962d5 Move registry actions back to pkg/
Signed-off-by: Josh Dolitsky <josh@dolit.ski>
2021-08-30 11:24:18 -04:00
Josh Dolitsky 336c7862e5 Merge branch 'main' of github.com:helm/helm into hip-6
Signed-off-by: Josh Dolitsky <josh@dolit.ski>
2021-08-30 11:13:54 -04:00
Matt Farina 2ab0d0a89f Merge pull request #10008 from yxxhero/fix_HELM_PLUGINS_behavior_another_way
Fix helm plugins behavior another way
2021-08-30 10:47:33 -04:00
Mike Ng 75fe8883cc Rename newly introduced interface to InterfaceExt
Signed-off-by: Mike Ng <ming@redhat.com>
2021-08-27 09:38:04 -04:00
Mathieu Parent 58018d1210 Fix encoded path for 'helm dependency build'
Signed-off-by: Mathieu Parent <math.parent@gmail.com>
2021-08-27 09:03:51 +02:00
Mike Ng d51a61f9ab Introduce a new interface for WaitForDelete() to avoid breaking backwards compatibility
Signed-off-by: Mike Ng <ming@redhat.com>
2021-08-26 17:30:55 -04:00
Josh Dolitsky 0121f6a328 Merge branch 'main' of github.com:helm/helm into hip-6
Signed-off-by: Josh Dolitsky <josh@dolit.ski>
2021-08-26 16:51:02 -04:00
Mike Ng 655bdcd2fd feat: add optional boolean '--wait' flag to 'uninstall' command.
If set, 'uninstall' command will wait until all the resources are deleted before returning.
It will wait for as long as --timeout

closes #2378

Signed-off-by: Mike Ng <ming@redhat.com>
2021-08-26 15:31:49 -04:00
Bernd Gutjahr 5cf9735a9d improved coalesce readability by getting rid of continue statements
Signed-off-by: Bernd Gutjahr <bernd.gutjahr@microfocus.com>
2021-08-26 06:34:37 +02:00
Bernd Gutjahr 1740e7f89b enhanced coelesce_test with some more test cases
Signed-off-by: Bernd Gutjahr <bernd.gutjahr@microfocus.com>
2021-08-26 06:34:37 +02:00
Matt Farina 0ff53945bf Fixing issue where helm show all fails to show crds when no readme
Closes #10058

Signed-off-by: Matt Farina <matt.farina@suse.com>
2021-08-25 11:50:17 -04:00
Matt Farina ac80a5eec9 Merge branch 'main' into feat/subcharts-scope 2021-08-25 10:18:31 -04:00
Matt Farina 2de6f9d424 Merge pull request #9993 from Ka0o0/make-isroot-available-to-template
Make Chart's IsRoot available to templates
2021-08-25 10:14:05 -04:00
Matt Farina f509bc6891 Merge pull request #10047 from lsowen/feature-10042
Fix SIGSEGV when job.Spec.Completions is nil
2021-08-25 09:55:56 -04:00
Matt Farina f1ef1020e2 Merge pull request #10017 from corhere/fix/9981-fail-message-with-newlines
fix(engine): parse fail messages with newlines
2021-08-25 09:52:33 -04:00
Matt Farina 9443a7ead4 Merge pull request #10033 from avorima/show-crds-command
Implement show crds subcommand
2021-08-24 12:36:00 -04:00
Matthew Fisher c7502671ef Merge pull request #9934 from jayonlau/clean_up
Clean up extra spaces
2021-08-23 23:23:48 -07:00
Kai Takac 8fcaf7b85c Add Chart IsRoot test
Signed-off-by: Kai Takac <kai.takac@gmail.com>
2021-08-23 20:10:37 +02:00