From b8e33cb5294a5c2d263fc8c7bb6e1f614ac79c10 Mon Sep 17 00:00:00 2001 From: Ivan Lausuch Date: Mon, 3 Jul 2023 10:38:09 +0200 Subject: [PATCH] Increase the verbose for cleanup_k8s https://progress.opensuse.org/issues/131522 --- cleanup_k8s.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cleanup_k8s.py b/cleanup_k8s.py index db4b1bb3..8d1a226e 100644 --- a/cleanup_k8s.py +++ b/cleanup_k8s.py @@ -1,13 +1,19 @@ +import os import logging from ocw.lib.gke import GKE from ocw.lib.eks import EKS from ocw.lib.aks import AKS from ocw.enums import ProviderChoice -from webui.PCWConfig import PCWConfig +from webui.PCWConfig import PCWConfig, ConfigFile, CONFIG_FILE def main(): + loglevel = 'INFO' + if os.path.exists(CONFIG_FILE): + loglevel = ConfigFile().get('default/loglevel', loglevel) + logger = logging.getLogger(__name__) + logging.basicConfig(level=loglevel) for namespace in PCWConfig.get_namespaces_for('k8sclusters'): providers = PCWConfig.get_providers_for("k8sclusters", namespace)