[ Agent ] [ APP ] - k8s dashboard

This commit is contained in:
zeaslity
2023-11-21 11:42:01 +08:00
parent d01ce135df
commit b4c44c7396
7 changed files with 46 additions and 26 deletions

View File

@@ -121,7 +121,7 @@ func CheckDeploymentStatusTimeout(specificDeployment string, supreme string, wai
func KubectlApplyExec(resourcesYamlFile string) (bool, []string) {
// check kubectl
if !BasicCommandExists("kubectl") {
if !BasicCommandExistByPath("kubectl") {
return false, []string{
"[KubectlApplyExec] - kubectl command not exist !",
}
@@ -136,7 +136,7 @@ func KubectlApplyExec(resourcesYamlFile string) (bool, []string) {
// apply -f
ok, resultLog := AllCommandExecutor([]string{
"kubectl",
"/usr/local/bin/kubectl",
"apply",
"-f",
resourcesYamlFile,
@@ -152,7 +152,7 @@ func KubectlApplyExec(resourcesYamlFile string) (bool, []string) {
func KubectlDeleteExec(resourcesYamlFile string) (bool, []string) {
// check kubectl
if !BasicCommandExists("kubectl") {
if !BasicCommandExistByPath("kubectl") {
return false, []string{
"[KubectlDeleteExec] - kubectl command not exist !",
}
@@ -167,7 +167,7 @@ func KubectlDeleteExec(resourcesYamlFile string) (bool, []string) {
// apply -f
ok, resultLog := AllCommandExecutor([]string{
"kubectl",
"/usr/local/bin/kubectl",
"delete",
"-f",
resourcesYamlFile,