Commit Graph

4433 Commits

Author SHA1 Message Date
Matthew Fisher 2e55dbe1fd
fix(helm): fix regression with TLS flags/environment variables not being parsed (#4657)
* fix(helm): fix regression with TLS flags/envvars

This change fixes some of the assumptions made in an earlier commit. Helm's TLS flags and environment variables were not respected because they were parsed well before execution (during settings.AddFlagsTLS()), causing erroneous behaviour at runtime. By re-introducing environment.Init(), Helm can properly parse environment variables at the correct time.

One change that had to occur in this PR is the fact that we need to call settings.Init() each time we call settings.AddFlagsTLS(). This is because each command owns its own FlagSet, so we need to parse each flagset to read and propagate the environment variables correctly.

I also noticed that we were maintaining two separate variables for each TLS value. Refactoring out some of the older code to all use the settings object makes the code much cleaner to read and fixes an issue where setting a flag or environment variable would propagate to the settings object, but we'd be reading from tlsEnable.

I've also added some unit tests to ensure this regression doesn't occur again.

Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>

* fix bug where os.ExpandEnv() on the default value causes differing behaviour

Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>

* add more context to the TODO/FIXME messages

Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
(cherry picked from commit 8be42bae88)
2018-09-19 11:25:30 -07:00
Caleb Delnay 19467a536a
Fix credentials not set for ResolveChartVersion default HTTP client (#4662)
Fixes Issue #4299 and Issue #4445

Signed-off-by: Caleb Delnay <calebdelnay@gmail.com>
(cherry picked from commit fbda50a452)
2018-09-19 11:25:30 -07:00
Qiang Li 3946629409
fix(helm): fix selector typo in service template for 'helm create' (#4663)
changed instancelease to instance in service template

closes #4661

Signed-off-by: Qiang Li <liqiang@gmail.com>
(cherry picked from commit 4dd9047586)
2018-09-19 11:25:29 -07:00
Louis Munro 6e8719e11e
Make ping() request a specific image. Add a getTillerPodImage method. (#4622)
Signed-off-by: Louis Munro <lm@louismunro.com>
(cherry picked from commit 7b821dd52f)
2018-09-19 11:25:29 -07:00
Steve Wolter 28d295be2a
Check for err before working with newRelease. (#4630)
Should fix #4585.

Signed-off-by: Steve Wolter <swolter@google.com>
(cherry picked from commit e868da1705)
2018-09-17 12:43:48 -07:00
Matt Butcher 4cc4aa5785
chore: update Sprig to 2.16 (#4652)
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
(cherry picked from commit 5a38e8fea9)
2018-09-17 12:43:30 -07:00
Matthew Fisher 8d408876a0
Fix race condition in `helm list` (#4620)
* Fix race in helm list when partitioning

Problem:
The chunks slice that is passed through the channel is reused for each
partition. This means that encoding the release into a message is racing with
populating the next partition, causing the results to sometimes not fit in the
message, and the release list to be incorrect

Solution:
Allocate a new slice for each partition

Issue #3322

Signed-off-by: Brian Marshall <bmarshall13@users.noreply.github.com>
(cherry picked from commit a0858e29d8)

* fix import sorting

Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>

* ref(release_server_test): use NewReleaseServer()

Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>

* add unit test for race condition in `helm list`

Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
(cherry picked from commit 5b23632446)
2018-09-10 11:19:58 -07:00
Robert James Hernandez 67b142ab0d
Fix for checking helm version slice bounds out of range (#4609)
* fix(helm): Use env to locate bash

Leverage '/usr/bin/env bash` for find bash instead of hardcoding
'/bin/bash' since some *nix OSes have it installed elsewhere.
Signed-off-by: Robert James Hernandez <rob@sarcasticadmin.com>

* test(helm): Adding case for versions short flag

When git sha is empty if being built from tarball running 'helm version
--short' should just ignore '--short' since sha is empty. Adding test
to ensure this is the case.

Signed-off-by: Robert James Hernandez <rob@sarcasticadmin.com>

* fix(helm): ignore short flag when sha is empty

Signed-off-by: Robert James Hernandez <rob@sarcasticadmin.com>
(cherry picked from commit 2b33bf6ba7)
2018-09-10 11:19:46 -07:00
Matthew Fisher 3a551d01d8
bump version to v2.11
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2018-09-07 13:48:05 -07:00
Anton Osmond 094b97ab5d Be explicit about where occurences of <CHARTNAME> will be replaced in starter charts (#4548)
Signed-off-by: Anton Osmond <antonosmond@gmail.com>
2018-09-07 13:41:40 -07:00
Ian Chen c539454c9c Fix grammer for tests (#4599)
Signed-off-by: Ian Chen <ianchen06@gmail.com>
2018-09-07 13:36:16 -07:00
Matthew Fisher 10db6a6fb5
introduce `helm init --automount-service-account-token` (#4589)
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2018-09-07 13:24:10 -07:00
Matthew Fisher bef59e40dc
allow settings TLS flags from environment variables (#4590)
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2018-09-07 13:23:40 -07:00
Matthew Fisher 941b1f4d68
fix(release_server): handle the case when requested values is empty (#4604)
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2018-09-07 12:22:12 -07:00
Fabian Ruff 37a731db79 Avoid importing k8s.io/kubernetes from pkg/helm (#4499)
* Avoid importing k8s.io/kubernetes from pkg/helm

When writing a helm client (e.g. a helm plugin) that talks to tiller importing k8s.io/helm/pkg/helm to get the grpc client is key.
This pkg should not have a dependency to the k8s.io/kubernetes to avoid pulling in a lot of code that is only used within tiller and blow up binary sizes.

Signed-off-by: Fabian Ruff <fabian@progra.de>

* Add references to pull request in errors message

Signed-off-by: Fabian Ruff <fabian@progra.de>

* copy helper function from pkg/storage/driver

Signed-off-by: Fabian Ruff <fabian@progra.de>

* Move storage errors to seperate package

Signed-off-by: Fabian Ruff <fabian@progra.de>

* Keep old  error variables for backward compatibility

Signed-off-by: Fabian Ruff <fabian@progra.de>
2018-09-04 11:19:33 -07:00
Christian Köberl 2e9855b98b Set proxy for all connections, fixes #4326 (#4579)
Signed-off-by: Christian Koeberl <christian.koeberl@gmail.com>
2018-09-03 06:57:41 -07:00
Matthew Fisher 7da7047cee
Merge pull request #4078 from adshmh/2742-feat-helm-notes-command
New helm notes command to display notes provided by a release's chart
2018-09-02 11:59:50 -07:00
Arash Deshmeh 7f703f50a9 feat(helm): added new helm notes command to display notes provided by the chart of a release
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
2018-09-02 05:43:13 -04:00
Matthew Fisher 8a72628beb
Merge pull request #4340 from adshmh/4321-feat-helm-sort-releases-by-chart-name
feat(helm): add ability to sort release list by chart name
2018-09-01 07:40:29 -07:00
Matthew Fisher 9abd42bbad
Merge pull request #4461 from aswinkarthik/fix-init-wait-on-tls
Fix init wait on tls
2018-09-01 07:36:38 -07:00
Arash Deshmeh 380ca1a923 feat(helm): add ability to sort release list by chart name
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
2018-09-01 05:40:07 -04:00
aswinkarthik 1b34a511d4
fix(helm): Add --tiller-tls-hostname flag to 'helm init'
This will fix the bug where 'helm init --wait' fails when TLS is used.

Signed-off-by: aswinkarthik <aswinkarthik93@gmail.com>
2018-09-01 11:29:57 +05:30
Matthew Fisher 3f0c6c5404
Merge pull request #4221 from cmattoon/issue-2347
Do not fail linting because of missing 'required' template values
2018-08-31 17:29:26 -07:00
Matthew Fisher faa921dd7c
Merge pull request #4358 from novas0x2a/fake-improvements
Flesh out the fake client even more
2018-08-31 17:09:23 -07:00
Matthew Fisher 48e26e74eb
Merge pull request #4172 from mattjmcnaughton/mattjmcnaughton/containerize-test-steps-in-Makefile
Add containerized options for tests in Makefile
2018-08-31 11:47:59 -07:00
Michelle Noorali 8761bb009f
Merge pull request #4517 from mattfarina/dco
Moving from CLA to DCO in contribution guide
2018-08-27 15:06:53 -04:00
Matthew Fisher d3b69c1fc1
Merge pull request #4327 from imroc/master
feat(helm): hiding password input on terminal
2018-08-26 20:55:56 -07:00
roc 518a9d63e6 feat(helm): hiding password input on terminal
When using "helm repo add" with "--username" and without "--password",
hide user's input with a password prompt. This allows users to not
expose their passwords to the command line history.
2018-08-27 11:39:10 +08:00
mattjmcnaughton 17151b99ea Add containerized options for tests in Makefile
Add an option to run the `test-unit`, `test-style`, and `test`
steps from the `Makefile` insides of a docker container. Doing so
isolates this component of helm development from any other aspect of
your global go environment.

These commands all have the name `docker-*`. Long term, there may
be reproducibility benefits to running all of the Make steps in a
container by default, in which case `containerized-test-unit` could
become `test-unit`.
2018-08-25 22:07:13 -04:00
Matthew Fisher 4589ae2c45
Merge pull request #4486 from smurfralf/master
Improve documentation for helm upgrade (#4030)
2018-08-24 13:28:11 -07:00
smurfralf c4d6b5a434 Tweeks per bacon review 2018-08-24 16:23:25 -04:00
smurfralf eeb3a1454a Improve documentation for helm upgrade (#4030)
Expand and clarify documentation for `helm upgrade` to include nuances
of command line values setting.

Fixes issue #4030
2018-08-24 16:22:52 -04:00
Matthew Fisher dee4bfb226
Merge pull request #4530 from nojnhuh/patch-1
Fix typo in message.go
2018-08-24 11:56:58 -07:00
Jon Huhn 0b4e086e05
Fix typo in message.go 2018-08-24 13:38:36 -05:00
Adam Reese eb0dffcbd9
Merge pull request #4338 from dustyrip/zsh-compinit-patch
Allow zsh completion to be autoloaded by compinit
2018-08-24 11:23:42 -07:00
Taylor Thomas dc130c5f4b
Merge pull request #4528 from hickeyma/fix-create-helm-note
Fix helm create note for k8 label convention changes
2018-08-24 10:14:07 -07:00
Taylor Thomas e3d4206b65
Merge pull request #4469 from rimusz/master
add Tillerless Helm blog post and plugin references
2018-08-24 10:05:27 -07:00
Matthew Fisher d1c45b090e
Merge pull request #4529 from hobti01/patch-4
docs: Messages are encrypted when using client-tiller TLS
2018-08-24 09:11:01 -07:00
Tim Hobbs 0b3924b2ac
Messages are encrypted when using TLS
When helm client and tiller use TLS their messages are encrypted, not unencrypted ;)
2018-08-24 18:03:23 +02:00
Matt Farina a4e2e8b505
Moving from CLA to DCO in contribution guide
Signed-off-by: Matt Farina <matt@mattfarina.com>
2018-08-24 11:34:48 -04:00
Martin Hickey 7306b4c28e Fix helm create note for k8 label convention changes
Update to note as per changes in Issue #4335 . Otherwise cannot
retrieve the pod with the label names.
2018-08-24 16:17:41 +01:00
Matthew Fisher 78550dd2c8
Merge pull request #4522 from dustinspecker/patch-1
docs: remove extraneous "it"
2018-08-24 07:15:04 -07:00
Dustin Specker 8c69e1af4f
docs: remove extraneous "it" 2018-08-24 06:58:20 -05:00
Adam Reese b95eb54bf2
Merge pull request #4420 from adamreese/ref/kube-1.11
ref(*): kubernetes v1.11 support
2018-08-21 08:47:18 -07:00
Matt Farina cc7cc1087f
Merge pull request #4448 from mattfarina/update-labels
Updating to the k8s label convention
2018-08-20 17:06:05 -04:00
Matt Farina 83e3571358
Merge branch 'master' into update-labels 2018-08-20 17:02:14 -04:00
Matt Farina 777886359c
Merge pull request #4478 from mattfarina/helm-cncf-contact-update
docs(README): Updating for Helm in CNCF
2018-08-20 17:01:23 -04:00
Matt Farina f0af0abbb0
Merge branch 'master' into helm-cncf-contact-update 2018-08-20 16:57:11 -04:00
Matthew Fisher 0f10ded76d
Merge pull request #4484 from bacongobbler/fix-get-script-again
strip out all extra lines other than the first for parsing
2018-08-17 13:12:52 -07:00
Matthew Fisher c15a355da7
strip out all extra lines other than the first for parsing 2018-08-17 13:09:24 -07:00