fix(helm): fix for issue #680r

details: the host flag for install overrides the
TILLER_HOST env var. If neither are set,
host defaults to ":44134".
pull/701/head
fibonacci1729 8 years ago
parent 8ae7eb7d5d
commit 9e0408fc57

@ -73,16 +73,14 @@ func printRelease(rel *release.Release) {
} }
func setupInstallEnv() { func setupInstallEnv() {
// note: TILLER_HOST envvar is // The 'host' flag takes precendence uber alles.
// acknowledged iff the host flag // If set, proceed with install using provided host
// does not override the default. // address. If unset, the 'TILLER_HOST' environment
// // variable (if set) is used, otherwise defaults to ":44134".
// bug: except that if the host flag happens to set the host to the same if tillerHost == "" {
// value as the defaultHost, the env var will be used instead. tillerHost = os.Getenv(hostEnvVar)
if tillerHost == defaultHost { if tillerHost == "" {
host := os.Getenv(hostEnvVar) tillerHost = defaultHost
if host != "" {
tillerHost = host
} }
} }
@ -90,7 +88,7 @@ func setupInstallEnv() {
} }
func init() { func init() {
installCmd.Flags().StringVar(&tillerHost, "host", defaultHost, "address of tiller server") installCmd.Flags().StringVar(&tillerHost, "host", "", "address of tiller server (default \":44134\")")
installCmd.Flags().BoolVar(&installDryRun, "dry-run", false, "simulate an install") installCmd.Flags().BoolVar(&installDryRun, "dry-run", false, "simulate an install")
RootCommand.AddCommand(installCmd) RootCommand.AddCommand(installCmd)

6
glide.lock generated

@ -1,5 +1,5 @@
hash: 998d87445fec0bd715fa5ccbcc227cb4997e56ceff58dc8eb53ea2e0cc84abfd hash: 206ac8a0bde06c910b7100ca5de782dc96728e29693af6671cf5a52d1942b9c9
updated: 2016-04-27T16:11:47.531200165-06:00 updated: 2016-05-11T16:15:47.057456197-06:00
imports: imports:
- name: bitbucket.org/ww/goautoneg - name: bitbucket.org/ww/goautoneg
version: 75cd24fc2f2c version: 75cd24fc2f2c
@ -352,4 +352,6 @@ imports:
- pkg/controller/podautoscaler/metrics - pkg/controller/podautoscaler/metrics
- name: speter.net/go/exp/math/dec/inf - name: speter.net/go/exp/math/dec/inf
version: 42ca6cd68aa922bc3f32f1e056e61b65945d9ad7 version: 42ca6cd68aa922bc3f32f1e056e61b65945d9ad7
repo: git@github.com:go-inf/inf.git
vcs: git
devImports: [] devImports: []

@ -30,3 +30,6 @@ import:
- pkg/kubectl/cmd/util - pkg/kubectl/cmd/util
- pkg/kubectl/resource - pkg/kubectl/resource
- package: github.com/gosuri/uitable - package: github.com/gosuri/uitable
- package: speter.net/go/exp/math/dec/inf
vcs: git
repo: git@github.com:go-inf/inf.git

Loading…
Cancel
Save