Adjustment Deployment
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user