From 207411d13e40dd817b7807fd19425f4de938fd39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Dan=C4=9Bk?= Date: Tue, 2 Apr 2024 13:34:38 +0200 Subject: [PATCH] Collect logs from istio and knative namespaces (#127) --- src/main/java/io/odh/test/OdhConstants.java | 2 ++ src/main/java/io/odh/test/framework/logs/LogCollector.java | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/main/java/io/odh/test/OdhConstants.java b/src/main/java/io/odh/test/OdhConstants.java index 8bdf208c..f6274d99 100644 --- a/src/main/java/io/odh/test/OdhConstants.java +++ b/src/main/java/io/odh/test/OdhConstants.java @@ -67,6 +67,8 @@ private OdhConstants() { } public static final String ODH_MODEL_OPERATOR = "odh-model-controller"; public static final String ODH_NOTEBOOK_OPERATOR = "odh-notebook-controller-manager"; public static final String KUEUE_OPERATOR = "kueue-controller-manager"; + public static final String KNATIVE_SERVING_NAMESPACE = "knative-serving"; + public static final String ISTIO_SYSTEM_NAMESPACE = "istio-system"; public static final String CONTROLLERS_NAMESPACE = getOdhOrRhoai("CONTROLLERS_NAMESPACE", ODH_CONTROLLERS_NAMESPACE, RHOAI_CONTROLLERS_NAMESPACE); public static final String DASHBOARD_ROUTE_NAME = getOdhOrRhoai("DASHBOARD_ROUTE_NAME", ODH_DASHBOARD_ROUTE_NAME, RHOAI_DASHBOARD_ROUTE_NAME); diff --git a/src/main/java/io/odh/test/framework/logs/LogCollector.java b/src/main/java/io/odh/test/framework/logs/LogCollector.java index 24e0f746..2c9fe57a 100644 --- a/src/main/java/io/odh/test/framework/logs/LogCollector.java +++ b/src/main/java/io/odh/test/framework/logs/LogCollector.java @@ -35,6 +35,8 @@ public static void saveKubernetesState(ExtensionContext extensionContext, Throwa ResourceManager.addNamespaceForLogCollect(OdhConstants.OLM_OPERATOR_NAMESPACE); ResourceManager.addNamespaceForLogCollect(OdhConstants.CONTROLLERS_NAMESPACE); ResourceManager.addNamespaceForLogCollect(OdhConstants.MONITORING_NAMESPACE); + ResourceManager.addNamespaceForLogCollect(OdhConstants.ISTIO_SYSTEM_NAMESPACE); + ResourceManager.addNamespaceForLogCollect(OdhConstants.KNATIVE_SERVING_NAMESPACE); } catch (Exception ignored) { LOGGER.warn("Cannot label namespaces for collect logs"); }