automatically create kubeconfig

Signed-off-by: hongming <talonwan@yunify.com>
This commit is contained in:
hongming
2019-04-25 10:29:57 +08:00
committed by zryfish
parent da0ca36d1a
commit ece9049836
23 changed files with 123 additions and 95 deletions

View File

@@ -21,6 +21,7 @@ import (
"kubesphere.io/kubesphere/pkg/constants"
"kubesphere.io/kubesphere/pkg/informers"
"kubesphere.io/kubesphere/pkg/params"
"kubesphere.io/kubesphere/pkg/utils/k8sutil"
"kubesphere.io/kubesphere/pkg/utils/sliceutil"
"sort"
"strings"
@@ -60,6 +61,14 @@ func (*jobSearcher) match(match map[string]string, item *batchv1.Job) bool {
if jobStatus(item) != v {
return false
}
case includeCronJob:
if v == "false" && k8sutil.IsControlledBy(item.OwnerReferences, cronJobKind, "") {
return false
}
case includeS2iRun:
if v == "false" && k8sutil.IsControlledBy(item.OwnerReferences, s2iRunKind, "") {
return false
}
case Name:
names := strings.Split(v, "|")
if !sliceutil.HasString(names, item.Name) {