db import Datas added

This commit is contained in:
mr
2026-01-21 12:03:02 +01:00
parent 4ff6e706ca
commit 7a8a4f678a
12 changed files with 83 additions and 58 deletions

View File

@@ -52,11 +52,8 @@ func Create_Helm(folder string, release string, namespace string) error {
}
ExtractTrees("assets", tmp)
clusterName := "opencloud"
host := "beta.opencloud.com"
if b, err := os.ReadFile(folder + "/" + release + "-values.yaml"); err == nil {
clusterName, _ = utils.Extract(string(b), "clusterName")
host, _ = utils.Extract(string(b), "host")
}
@@ -89,13 +86,9 @@ func Create_Helm(folder string, release string, namespace string) error {
if err := utils.Exec("helm upgrade --install " + release + " " + tmp + " -n " + namespace + " --create-namespace -f " + folder + "/" + release + "-values.yaml --debug"); err != nil {
return err
}
utils.Exec("kind get kubeconfig --name " + clusterName + " > ./deployed_config")
utils.Exec("kind export logs ./kind-logs")
utils.Exec("sudo rm -rf " + tmp)
utils.Exec("sudo sed -i.bak \"/[[:space:]]" + host + "$/d\" /etc/hosts")
utils.Exec("echo \"$(kubectl get nodes -o jsonpath='{.items[0].status.addresses[?(@.type==\"InternalIP\")].address}') " + host + "\" | sudo tee -a /etc/hosts > /dev/null")
utils.Exec("sudo sed -i.bak \"\n/[[:space:]]" + host + "$/d\" /etc/hosts")
utils.Exec("echo \"\n127.0.0.1 " + host + "\" | sudo tee -a /etc/hosts > /dev/null")
return nil
}