-
Notifications
You must be signed in to change notification settings - Fork 220
provide a configurable namespace where to locate tiller #359
Conversation
src/api/config/config.go
Outdated
TillerPortForward bool `yaml:"tillerPortForward"` | ||
CacheRefreshInterval int64 `yaml:"cacheRefreshInterval"` | ||
ReleasesEnabled bool `yaml:"releasesEnabled"` | ||
TillerNameSpace string "kube-system" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should rename this to TillerNamespace.
Go doesn't let you set defaults for a struct field (unfortunately), so the only way to do this would be to change GetConfig()
to set TillerNamespace = "kube-system" if it's not set. The unset value for a string is simply empty string for Go, so a simple if statement such as works:
if conf.TillerNamespace == "" {
conf.TillerNamespace = "kube-system"
}
This should be set in GetConfig() after reading in the config from the file.
You should update the field definition to:
TillerNamespace string `yaml:"tillerNamespace"`
b6fc864
to
06e30ce
Compare
Codecov Report
@@ Coverage Diff @@
## master #359 +/- ##
=======================================
Coverage 90.77% 90.77%
=======================================
Files 18 18
Lines 748 748
=======================================
Hits 679 679
Misses 45 45
Partials 24 24 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add a commented out example of this configu option to docs/config.example.yml
?
src/api/data/helm/client/client.go
Outdated
@@ -39,6 +38,8 @@ func NewHelmClient() data.Client { | |||
// InitializeClient returns a helm.client | |||
func (c *helmClient) initialize() (*helm.Client, error) { | |||
// From helm.setupConnection | |||
conf, _ := config.GetConfig() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should catch and return the error here
@karmab are you able to pick this back up? would be great to have this fix in :) |
yes Will do it asap
El El lun, 2 oct 2017 a las 11:16, Adnan Abdulhussein <
[email protected]> escribió:
@karmab <https://github.com/karmab> are you able to pick this back up?
would be great to have this fix in :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#359 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABwVA7E1krumaBTci0tBBiLwSyuXUdZcks5soKnwgaJpZM4Pg3yZ>
.
--
Karim,
|
06e30ce
to
a43c0a0
Compare
addressed as per your comments |
a43c0a0
to
e4fe714
Compare
src/api/config/config.go
Outdated
@@ -37,6 +37,7 @@ type Configuration struct { | |||
OAuthConfig oauthConfig `yaml:"oauthConfig"` | |||
SigningKey string `yaml:"signingKey"` | |||
Initialized bool | |||
TillerNamespace string `yaml:"tillerNamespace"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you run gofmt on your code? It should correctly align this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@karmab it still doesn't look properly aligned?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually you were right but we're good now!
e4fe714
to
7f8cd5d
Compare
anything more needed? |
7f8cd5d
to
7186c33
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm! thanks @karmab
as of today, monocular wont be able to connect to a tiller-deploy running outside of the kube-system namespace.
so we provide the ability to use a specific namespace from the config file