aboutsummaryrefslogtreecommitdiffstats
path: root/test/security/k8s/src/check/check.go
diff options
context:
space:
mode:
authorPawel Wieczorek <p.wieczorek2@samsung.com>2019-09-27 16:10:33 +0200
committerPawel Wieczorek <p.wieczorek2@samsung.com>2019-09-27 17:38:49 +0200
commit96f4e2fe0ef3bfaf8371f29562ecb6129f20e3ab (patch)
tree2288de65e30918dc76069e74b51498026e23acc0 /test/security/k8s/src/check/check.go
parentcd41e6ad30e6a0a06915b3630b81bb8894ca9b01 (diff)
k8s: Add scheduler information collection
Issue-ID: SECCOM-235 Change-Id: I7da645737440172d3cf11f33069daa2697f83056 Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
Diffstat (limited to 'test/security/k8s/src/check/check.go')
-rw-r--r--test/security/k8s/src/check/check.go12
1 files changed, 10 insertions, 2 deletions
diff --git a/test/security/k8s/src/check/check.go b/test/security/k8s/src/check/check.go
index c185887d7..b9814829e 100644
--- a/test/security/k8s/src/check/check.go
+++ b/test/security/k8s/src/check/check.go
@@ -4,6 +4,8 @@ package check
type Informer interface {
// GetAPIParams returns API server parameters.
GetAPIParams() ([]string, error)
+ // GetSchedulerParams returns scheduler parameters.
+ GetSchedulerParams() ([]string, error)
}
// Command represents commands run on cluster.
@@ -12,14 +14,17 @@ type Command int
const (
// APIProcess represents API server command ("kube-apiserver").
APIProcess Command = iota
+ // SchedulerProcess represents scheduler command ("kube-scheduler").
+ SchedulerProcess
)
func (c Command) String() string {
names := [...]string{
"kube-apiserver",
+ "kube-scheduler",
}
- if c < APIProcess || c > APIProcess {
+ if c < APIProcess || c > SchedulerProcess {
return "exit"
}
return names[c]
@@ -31,14 +36,17 @@ type Service int
const (
// APIService represents API server service ("kubernetes/kubernetes").
APIService Service = iota
+ // SchedulerService represents scheduler service ("kubernetes/scheduler").
+ SchedulerService
)
func (s Service) String() string {
names := [...]string{
"kubernetes/kubernetes",
+ "kubernetes/scheduler",
}
- if s < APIService || s > APIService {
+ if s < APIService || s > SchedulerService {
return ""
}
return names[s]