Adjustment Deployment

This commit is contained in:
mr
2026-01-19 11:24:16 +01:00
parent 1b77b8b6cf
commit 827b6f4211
955 changed files with 81 additions and 138174 deletions

View File

@@ -67,10 +67,12 @@ func Create_Helm(args ...string) error {
folder = args[0]
}
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")
}
if len(args) > 1 {
release = args[1]
}
@@ -111,6 +113,10 @@ func Create_Helm(args ...string) error {
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("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")
return nil
}