Charts locaux
This commit is contained in:
@@ -71,18 +71,19 @@ func (this *InstallClass) ChartRepo() (error) {
|
||||
bin_path, _ := this.getToolBin("helm")
|
||||
|
||||
for _, v := range this.charts {
|
||||
log.Log().Info().Msg(fmt.Sprintf(" >> Helm Repo : %s", v.Name))
|
||||
repo := helm.HelmRepo{Bin: bin_path,
|
||||
Name: v.Name,
|
||||
Repository: v.Repository,
|
||||
ForceUpdate: true}
|
||||
res, err := repo.AddRepository()
|
||||
if err != nil {
|
||||
log.Log().Info().Msg(fmt.Sprintf(" << %s ", err))
|
||||
return err
|
||||
if v.Repository.Name != "" {
|
||||
log.Log().Info().Msg(fmt.Sprintf(" >> Helm Repo : %s", v.Repository.Name))
|
||||
repo := helm.HelmRepo{Bin: bin_path,
|
||||
Name: v.Repository.Name,
|
||||
Repository: v.Repository.Url,
|
||||
ForceUpdate: v.Repository.ForceUpdate}
|
||||
res, err := repo.AddRepository()
|
||||
if err != nil {
|
||||
log.Log().Info().Msg(fmt.Sprintf(" << %s ", err))
|
||||
return err
|
||||
}
|
||||
log.Log().Info().Msg(fmt.Sprintf(" << %s ", res))
|
||||
}
|
||||
log.Log().Info().Msg(fmt.Sprintf(" << %s ", res))
|
||||
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -116,6 +117,7 @@ func (this *InstallClass) installChart(helm_bin string, kubectl_bin string, char
|
||||
helmchart := helm.HelmChart{Bin: helm_bin,
|
||||
Name: chart.Name,
|
||||
Chart: chart.Chart,
|
||||
Url: chart.Url,
|
||||
Version: chart.Version,
|
||||
Workspace: this.Workspace,
|
||||
Opts: chart.Opts,
|
||||
@@ -127,7 +129,7 @@ func (this *InstallClass) installChart(helm_bin string, kubectl_bin string, char
|
||||
|
||||
res, err := helmchart.Install()
|
||||
if err != nil {
|
||||
log.Log().Error().Msg(fmt.Sprintf(" >> %s %s (%s)", helmchart.Name, "KO", err))
|
||||
log.Log().Error().Msg(fmt.Sprintf(" >> %s %s (%s)", helmchart.Name, "KO", err))
|
||||
return
|
||||
}
|
||||
log.Log().Info().Msg(fmt.Sprintf(" >> %s (%s)", helmchart.Name, res))
|
||||
|
||||
Reference in New Issue
Block a user