kube-forge v2: embede python with ansible (kubespray) and cobra as cli building tool

This commit is contained in:
2025-06-22 00:37:47 +03:00
parent c2df2abc78
commit 4142a9db61
830 changed files with 874 additions and 2047 deletions

View File

@@ -4,6 +4,7 @@ import (
"bytes"
"embed"
"kube-forge/internal/config"
"kube-forge/internal/logging"
"kube-forge/internal/resources"
"os"
"path/filepath"
@@ -37,7 +38,13 @@ func applyTemplates(templates [][2]string) {
config := config.GetConfig()
for _, templateData := range templates {
var templateFile = templateData[0]
var outFile = filepath.Join(config.WorkDir, templateData[1])
var outFile = filepath.Join(config.BaseDir, templateData[1])
dir := filepath.Dir(outFile)
err := os.MkdirAll(dir, 0755)
if err != nil {
logging.Log.Fatal(err)
}
tmpl := getTemplateFromEmbedFSFolder(resources.Templates, templateFile)