Charts locaux

This commit is contained in:
admju
2024-09-03 15:18:11 +00:00
parent 11a4d5cc90
commit 756638fe21
7 changed files with 72 additions and 27 deletions

View File

@@ -16,6 +16,8 @@ type HelmChart struct {
Name string
Chart string
Version string
Url string
Workspace string
Opts string
Values string
@@ -39,12 +41,27 @@ func (this HelmChart) Install() (string, error) {
if err != nil {
return "", err
}
// existe := false
if existe {
return "Existe déjà", nil
}
msg := fmt.Sprintf("%s install %s %s %s --output json", bin, this.Name, this.Chart, this.Opts)
ficChart := this.Chart
// Recherche locale
if _, err := os.Stat(ficChart); err != nil {
} else {
// Recherche voa le Workspace
ficChart := filepath.Join(this.Workspace, this.Chart)
if _, err := os.Stat(ficChart); err == nil {
} else {
if this.Url != "" {
fmt.Println("============ 52 Télechargement", this.Url)
}
}
}
msg := fmt.Sprintf("%s install %s %s %s --output json", bin, this.Name, ficChart, this.Opts)
if this.Version != "" {
msg = fmt.Sprintf("%s --version %s", msg, this.Version)