[ Agent ] [ App ] - fix app bugs
This commit is contained in:
@@ -223,7 +223,7 @@ func (op *AgentOsOperator) deployK8sNamespace(funcArgs []string) (bool, []string
|
||||
}
|
||||
|
||||
return true, []string{
|
||||
fmt.Sprintf("Namespace of [%s]create success !", funcArgs[1]),
|
||||
fmt.Sprintf("Namespace of [%s] create success !", funcArgs[1]),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -288,6 +288,11 @@ func (op *AgentOsOperator) deployNFS(funcArgs []string) (bool, []string) {
|
||||
result = append(result, "命令不存在", "kubectl")
|
||||
return false, result
|
||||
}
|
||||
folder, i := CheckAppInstallFolder()
|
||||
if !folder {
|
||||
return false, i
|
||||
}
|
||||
|
||||
// 创建目录修改权限
|
||||
if !BasicFolderExists(nfsDataPath) {
|
||||
return false, []string{
|
||||
@@ -447,6 +452,10 @@ func (op *AgentOsOperator) deployMySQL(funcArgs []string) (bool, []string) {
|
||||
result = append(result, "命令不存在", "kubectl")
|
||||
return false, result
|
||||
}
|
||||
folder, i := CheckAppInstallFolder()
|
||||
if !folder {
|
||||
return false, i
|
||||
}
|
||||
|
||||
// 下载模板文件
|
||||
k8sMysqlYamlFile := "/root/wdd/install/k8s-mysql.yaml"
|
||||
@@ -492,6 +501,11 @@ func (op *AgentOsOperator) deployMySQL(funcArgs []string) (bool, []string) {
|
||||
|
||||
func (op *AgentOsOperator) loadMysqlInitScript(funcArgs []string) (bool, []string) {
|
||||
|
||||
folder, i := CheckAppInstallFolder()
|
||||
if !folder {
|
||||
return false, i
|
||||
}
|
||||
|
||||
// download offline sql list
|
||||
if len(funcArgs) <= 7 {
|
||||
return false, []string{
|
||||
@@ -609,6 +623,10 @@ func (op *AgentOsOperator) deployMiddlewares(funcArgs []string) (bool, []string)
|
||||
result = append(result, "命令不存在", "kubectl")
|
||||
return false, result
|
||||
}
|
||||
folder, i := CheckAppInstallFolder()
|
||||
if !folder {
|
||||
return false, i
|
||||
}
|
||||
|
||||
// 下载模板文件
|
||||
k8sMiddlewaresYamlFile := "/root/wdd/install/k8s-middlewares.yaml"
|
||||
@@ -676,6 +694,10 @@ func (op *AgentOsOperator) deployRedis(funcArgs []string) (bool, []string) {
|
||||
result = append(result, "命令不存在", "kubectl")
|
||||
return false, result
|
||||
}
|
||||
folder, i := CheckAppInstallFolder()
|
||||
if !folder {
|
||||
return false, i
|
||||
}
|
||||
|
||||
// 下载模板文件
|
||||
k8sRedisYamlFile := "/root/wdd/install/k8s-redis.yaml"
|
||||
@@ -739,6 +761,10 @@ func (op *AgentOsOperator) deployIngress(funcArgs []string) (bool, []string) {
|
||||
result = append(result, "命令不存在", commandName)
|
||||
return false, result
|
||||
}
|
||||
folder, i := CheckAppInstallFolder()
|
||||
if !folder {
|
||||
return false, i
|
||||
}
|
||||
|
||||
// 下载模板文件
|
||||
if !PureResultSingleExecute([]string{
|
||||
@@ -793,6 +819,10 @@ func (op *AgentOsOperator) deployFront(funcArgs []string) (bool, []string) {
|
||||
result = append(result, "命令不存在", commandName)
|
||||
return false, result
|
||||
}
|
||||
folder, i := CheckAppInstallFolder()
|
||||
if !folder {
|
||||
return false, i
|
||||
}
|
||||
|
||||
// 下载模板文件
|
||||
if !PureResultSingleExecute([]string{
|
||||
@@ -844,6 +874,10 @@ func (op *AgentOsOperator) initMinio(funcArgs []string) (bool, []string) {
|
||||
result = append(result, "命令不存在", commandName)
|
||||
return false, result
|
||||
}
|
||||
folder, i := CheckAppInstallFolder()
|
||||
if !folder {
|
||||
return false, i
|
||||
}
|
||||
|
||||
// 下载模板文件
|
||||
if !PureResultSingleExecute([]string{
|
||||
@@ -899,6 +933,10 @@ func (op *AgentOsOperator) deploySRS(funcArgs []string) (bool, []string) {
|
||||
result = append(result, "命令不存在", commandName)
|
||||
return false, result
|
||||
}
|
||||
folder, i := CheckAppInstallFolder()
|
||||
if !folder {
|
||||
return false, i
|
||||
}
|
||||
|
||||
// 下载模板文件
|
||||
if !PureResultSingleExecute([]string{
|
||||
|
||||
Reference in New Issue
Block a user