From ebc4f3dc39ef2a39593281f1898bbb5e487e1325 Mon Sep 17 00:00:00 2001 From: "Christian R. Garcia" Date: Thu, 7 Dec 2023 17:07:57 -0800 Subject: [PATCH] More logs for debugging traefik updating. --- service/kubernetes_utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/service/kubernetes_utils.py b/service/kubernetes_utils.py index 9fb6859..59090a2 100644 --- a/service/kubernetes_utils.py +++ b/service/kubernetes_utils.py @@ -553,6 +553,7 @@ def update_traefik_configmap(tcp_proxy_info: Dict[str, Dict[str, str]], proxy_info ({"pod_id1": {"routing_port": int, "url": str}, ...}): Dict of dict that specifies routing port + url needed to create pod service. """ + logger.debug("Top of update_traefik_configmap().") template_env = Environment(loader=FileSystemLoader("service/templates")) template = template_env.get_template('traefik-template.j2') rendered_template = template.render(tcp_proxy_info = tcp_proxy_info, @@ -563,6 +564,7 @@ def update_traefik_configmap(tcp_proxy_info: Dict[str, Dict[str, str]], # Only update the configmap if the current configmap is out of date. current_template = k8.read_namespaced_config_map(name='pods-traefik-conf', namespace=NAMESPACE) + logger.debug("Health checking for difference in Traefik configs.") if not current_template.data['traefik.yml'] == rendered_template: logger.debug("Health found difference in Traefik configs, updated configmap.") # Update the configmap with the new template immediately. @@ -575,4 +577,4 @@ def get_traefik_configmap(): """ current_template = k8.read_namespaced_config_map(name='pods-traefik-conf', namespace=NAMESPACE) - return current_template \ No newline at end of file + return current_template