Load configuration from mounted folders

This commit is contained in:
hongming
2018-06-14 13:59:04 +08:00
parent 2a06efd114
commit 26fcdb6d3e
3 changed files with 201 additions and 47 deletions

View File

@@ -21,6 +21,8 @@ import (
"github.com/emicklei/go-restful"
apierrors "k8s.io/apimachinery/pkg/api/errors"
"kubesphere.io/kubesphere/pkg/constants"
"kubesphere.io/kubesphere/pkg/models"
)
@@ -60,13 +62,14 @@ func delUser(req *restful.Request, resp *restful.Response) {
err := models.DelKubectlPod(user)
if err != nil {
if err != nil && !apierrors.IsNotFound(err) {
resp.WriteHeaderAndEntity(http.StatusInternalServerError, constants.MessageResponse{Message: err.Error()})
return
}
err = models.DelKubeConfig(user)
if err != nil {
if err != nil && !apierrors.IsNotFound(err) {
resp.WriteHeaderAndEntity(http.StatusInternalServerError, constants.MessageResponse{Message: err.Error()})
return
}