|
|
@ -52,13 +52,8 @@ type EnvSettings struct {
|
|
|
|
// PluginsDirectory is the path to the plugins directory.
|
|
|
|
// PluginsDirectory is the path to the plugins directory.
|
|
|
|
PluginsDirectory string
|
|
|
|
PluginsDirectory string
|
|
|
|
|
|
|
|
|
|
|
|
// Environment Variables Store
|
|
|
|
// Environment Variables Store.
|
|
|
|
EnvironmentVariables []EnvironmentVariable
|
|
|
|
EnvironmentVariables map[string]string
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type EnvironmentVariable struct {
|
|
|
|
|
|
|
|
Name string
|
|
|
|
|
|
|
|
Value string
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func New() *EnvSettings {
|
|
|
|
func New() *EnvSettings {
|
|
|
@ -67,7 +62,7 @@ func New() *EnvSettings {
|
|
|
|
RegistryConfig: helmpath.ConfigPath("registry.json"),
|
|
|
|
RegistryConfig: helmpath.ConfigPath("registry.json"),
|
|
|
|
RepositoryConfig: helmpath.ConfigPath("repositories.yaml"),
|
|
|
|
RepositoryConfig: helmpath.ConfigPath("repositories.yaml"),
|
|
|
|
RepositoryCache: helmpath.CachePath("repository"),
|
|
|
|
RepositoryCache: helmpath.CachePath("repository"),
|
|
|
|
EnvironmentVariables: []EnvironmentVariable{},
|
|
|
|
EnvironmentVariables: make(map[string]string),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
envSettings.setHelmEnvVars()
|
|
|
|
envSettings.setHelmEnvVars()
|
|
|
|
return &envSettings
|
|
|
|
return &envSettings
|
|
|
@ -118,11 +113,7 @@ func (s *EnvSettings) setHelmEnvVars() {
|
|
|
|
if eVal := os.Getenv(key); len(eVal) > 0 {
|
|
|
|
if eVal := os.Getenv(key); len(eVal) > 0 {
|
|
|
|
val = eVal
|
|
|
|
val = eVal
|
|
|
|
}
|
|
|
|
}
|
|
|
|
s.EnvironmentVariables = append(s.EnvironmentVariables,
|
|
|
|
s.EnvironmentVariables[key] = val
|
|
|
|
EnvironmentVariable{
|
|
|
|
|
|
|
|
Name: key,
|
|
|
|
|
|
|
|
Value: val,
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|