k8s: Add controller manager information collection
Issue-ID: SECCOM-235
Change-Id: Ieceb6337f935e6a5a6b94248ccf072229116510a
Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
diff --git a/test/security/k8s/src/check/check.go b/test/security/k8s/src/check/check.go
index b981482..cf412c1 100644
--- a/test/security/k8s/src/check/check.go
+++ b/test/security/k8s/src/check/check.go
@@ -6,6 +6,8 @@
GetAPIParams() ([]string, error)
// GetSchedulerParams returns scheduler parameters.
GetSchedulerParams() ([]string, error)
+ // GetControllerManagerParams returns controller manager parameters.
+ GetControllerManagerParams() ([]string, error)
}
// Command represents commands run on cluster.
@@ -16,15 +18,18 @@
APIProcess Command = iota
// SchedulerProcess represents scheduler command ("kube-scheduler").
SchedulerProcess
+ // ControllerManagerProcess represents controller manager command ("kube-controller-manager").
+ ControllerManagerProcess
)
func (c Command) String() string {
names := [...]string{
"kube-apiserver",
"kube-scheduler",
+ "kube-controller-manager",
}
- if c < APIProcess || c > SchedulerProcess {
+ if c < APIProcess || c > ControllerManagerProcess {
return "exit"
}
return names[c]
@@ -38,15 +43,18 @@
APIService Service = iota
// SchedulerService represents scheduler service ("kubernetes/scheduler").
SchedulerService
+ // ControllerManagerService represents controller manager service ("kubernetes/controller-manager").
+ ControllerManagerService
)
func (s Service) String() string {
names := [...]string{
"kubernetes/kubernetes",
"kubernetes/scheduler",
+ "kubernetes/controller-manager",
}
- if s < APIService || s > SchedulerService {
+ if s < APIService || s > ControllerManagerService {
return ""
}
return names[s]