Merge pull request #82 from Kayuii/master

issue #68 add stable_repo_url to change default stable repository
This commit is contained in:
Ivan Pedrazas
2018-11-29 23:03:57 +00:00
committed by GitHub
4 changed files with 60 additions and 3 deletions
+5 -1
View File
@@ -9,7 +9,6 @@ import (
"regexp"
"strconv"
"strings"
"text/template"
)
@@ -51,6 +50,7 @@ type (
HelmRepos []string `json:"helm_repos"`
Purge bool `json:"purge"`
UpdateDependencies bool `json:"update_dependencies"`
StableRepoURL string `json:"stable_repo_url"`
}
// Plugin default
Plugin struct {
@@ -196,6 +196,10 @@ func doHelmRepoAdd(repo string) ([]string, error) {
func doHelmInit(p *Plugin) []string {
init := make([]string, 1)
init[0] = "init"
if p.Config.StableRepoURL != "" {
init = append(init, "--stable-repo-url")
init = append(init, p.Config.StableRepoURL)
}
if p.Config.TillerNs != "" {
init = append(init, "--tiller-namespace")
init = append(init, p.Config.TillerNs)