[ 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

@@ -133,7 +133,11 @@ func (op *AgentOsOperator) deployRke(funcArgs []string) (bool, []string) {
},
})
//
if !BasicCreateFolder("/root/.kube") {
return false, []string{
"[deployRke] - folder [/root/.kube] create error!",
}
}
// replace ip addr
parseIP := net.ParseIP(funcArgs[0])

View File

@@ -1826,5 +1826,6 @@ func (op *AgentOsOperator) ok(funcArgs []string) [][]string {
}
func (op *AgentOsOperator) okExec(funcArgs []string) (bool, []string) {
log.WarnF("call empty base func ! func args are => %#v", funcArgs)
return true, nil
}

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,