values overwrite
This commit is contained in:
36
src/install/generate.go
Normal file
36
src/install/generate.go
Normal file
@@ -0,0 +1,36 @@
|
||||
package install
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
|
||||
log "oc-deploy/log_wrapper"
|
||||
"oc-deploy/utils"
|
||||
"oc-deploy/chart"
|
||||
)
|
||||
|
||||
func (this *InstallClass) NewGenerate() (string, error) {
|
||||
|
||||
// Extraction du fichier de la version
|
||||
dst, err := this.extractVersion()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
this.charts, _ = chart.FromConfigFile(dst)
|
||||
if err != nil {
|
||||
return dst, err
|
||||
}
|
||||
|
||||
for _, ele1 := range this.charts {
|
||||
for _, ele2 := range ele1.Charts {
|
||||
|
||||
filename := filepath.Join(this.Workspace, fmt.Sprintf("values-%s.yml", ele2.Name) )
|
||||
utils.CopyContentFile(ele2.Overwrite, filename)
|
||||
log.Log().Info().Msg(fmt.Sprintf(">> %s : %s", ele2.Name, filename))
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return dst, nil
|
||||
}
|
||||
Reference in New Issue
Block a user