Merge pull request #1210 from DanielMorsing/initGlobals

only init globals data once
This commit is contained in:
jetstack-bot 2019-01-14 16:08:05 +00:00 committed by GitHub
commit 49e48fff53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,10 +59,16 @@ var (
provisioned []Addon
)
var globalsInited = false
// InitGlobals actually allocates the addon values that are defined above.
// We do this here so that we can access the suites config structure during
// the definition of global addons.
func InitGlobals(cfg *config.Config) {
if globalsInited {
return
}
globalsInited = true
*Base = base.Base{}
*Tiller = tiller.Tiller{
Base: Base,