From f43690f2daf8c1a240cd13be679556f39ede6932 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Guti=C3=A9rrez?= Date: Fri, 19 Apr 2024 18:42:00 +0200 Subject: [PATCH] add ALL_NAMESPACES keyword for cluster-wide experiments Signed-off-by: Alvaro Gutierrez --- controllers/chaosengine_controller.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/controllers/chaosengine_controller.go b/controllers/chaosengine_controller.go index f07f7e08..f176f9f7 100644 --- a/controllers/chaosengine_controller.go +++ b/controllers/chaosengine_controller.go @@ -658,6 +658,12 @@ func getTargets(engine *chaosTypes.EngineInfo) string { return strings.Join(targets, ";") } + if engine.AppInfo.Appns == "ALL_NAMESPACES" { + engine.AppInfo.Appns = "" + } else if engine.AppInfo.Appns == "" { + engine.AppInfo.Appns = engine.Instance.Namespace + } + if engine.AppInfo.AppKind == "" { engine.AppInfo.AppKind = "KIND" }