helm/pkg
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
..
chartutil fix(helm): fix selector typo in service template for 'helm create' (#4663) 2018-09-19 11:25:29 -07:00
downloader Fix credentials not set for ResolveChartVersion default HTTP client (#4662) 2018-09-19 11:25:30 -07:00
engine Merge pull request #4221 from cmattoon/issue-2347 2018-08-31 17:29:26 -07:00
getter Set proxy for all connections, fixes #4326 (#4579) 2018-09-03 06:57:41 -07:00
helm fix(helm): fix regression with TLS flags/environment variables not being parsed (#4657) 2018-09-19 11:25:30 -07:00
hooks change copyright to "Copyright The Helm Authors" 2018-07-30 08:29:17 -07:00
ignore change copyright to "Copyright The Helm Authors" 2018-07-30 08:29:17 -07:00
kube ref(*): kubernetes v1.11 support 2018-08-09 19:13:12 -07:00
lint Merge pull request #4221 from cmattoon/issue-2347 2018-08-31 17:29:26 -07:00
manifest [manifests] hoist the regex out of SplitManifests 2018-08-06 17:24:02 -07:00
plugin change copyright to "Copyright The Helm Authors" 2018-07-30 08:29:17 -07:00
proto/hapi feat(helm): add ability to sort release list by chart name 2018-09-01 05:40:07 -04:00
provenance change copyright to "Copyright The Helm Authors" 2018-07-30 08:29:17 -07:00
releasetesting change copyright to "Copyright The Helm Authors" 2018-07-30 08:29:17 -07:00
releaseutil feat(helm): add ability to sort release list by chart name 2018-09-01 05:40:07 -04:00
renderutil [templates] extract some rendering code into a package 2018-08-06 17:24:02 -07:00
repo Only propagate query string if refURL is relative to baseURL 2018-08-06 18:25:02 -05:00
resolver change copyright to "Copyright The Helm Authors" 2018-07-30 08:29:17 -07:00
rudder change copyright to "Copyright The Helm Authors" 2018-07-30 08:29:17 -07:00
storage Avoid importing k8s.io/kubernetes from pkg/helm (#4499) 2018-09-04 11:19:33 -07:00
strvals Fix typo in parser.go 2018-08-17 09:34:59 -05:00
sympath change copyright to "Copyright The Helm Authors" 2018-07-30 08:29:17 -07:00
tiller Check for err before working with newRelease. (#4630) 2018-09-17 12:43:48 -07:00
timeconv change copyright to "Copyright The Helm Authors" 2018-07-30 08:29:17 -07:00
tlsutil fix(helm): fix(helm): add `--tls-hostname` flag to tls flags 2018-08-07 16:56:40 -07:00
urlutil change copyright to "Copyright The Helm Authors" 2018-07-30 08:29:17 -07:00
version bump version to v2.11 2018-09-07 13:48:05 -07:00