From 5a61d615fe1c05487c26c32b2e8e4416f6cbb421 Mon Sep 17 00:00:00 2001
From: Pawel Wieczorek
Date: Fri, 27 Sep 2019 18:26:13 +0200
Subject: k8s: Add controller manager information collection
Issue-ID: SECCOM-235
Change-Id: Ieceb6337f935e6a5a6b94248ccf072229116510a
Signed-off-by: Pawel Wieczorek
---
test/security/k8s/src/check/raw/raw.go | 6 ++++++
1 file changed, 6 insertions(+)
(limited to 'test/security/k8s/src/check/raw')
diff --git a/test/security/k8s/src/check/raw/raw.go b/test/security/k8s/src/check/raw/raw.go
index 3c5409aee..04a6fa554 100644
--- a/test/security/k8s/src/check/raw/raw.go
+++ b/test/security/k8s/src/check/raw/raw.go
@@ -40,6 +40,12 @@ func (r *Raw) GetSchedulerParams() ([]string, error) {
return getProcessParams(check.SchedulerProcess)
}
+// GetControllerManagerParams returns parameters of running Kubernetes scheduler.
+// It queries only cluster nodes with "controlplane" role.
+func (r *Raw) GetControllerManagerParams() ([]string, error) {
+ return getProcessParams(check.ControllerManagerProcess)
+}
+
func getProcessParams(process check.Command) ([]string, error) {
nodes, err := config.GetNodesInfo()
if err != nil {
--
cgit 1.2.3-korg