From f332ae6c720b89d771a0194117aa3369bc82b275 Mon Sep 17 00:00:00 2001 From: Evan Krall Date: Fri, 27 Oct 2023 11:05:08 -0700 Subject: [PATCH] Only manage LimitRanges in paastasvc-* namespaces --- paasta_tools/kubernetes_tools.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/paasta_tools/kubernetes_tools.py b/paasta_tools/kubernetes_tools.py index 3782464fcb..5979571d42 100644 --- a/paasta_tools/kubernetes_tools.py +++ b/paasta_tools/kubernetes_tools.py @@ -2712,6 +2712,12 @@ def ensure_paasta_api_rolebinding(kube_client: KubeClient, namespace: str) -> No def ensure_paasta_namespace_limits(kube_client: KubeClient, namespace: str) -> None: + if not namespace.startswith("paastasvc-"): + log.debug( + f"Not creating LimitRange because {namespace} does not start with paastasvc-" + ) + return + limits = get_all_limit_ranges(kube_client, namespace=namespace) limits_names = {item.metadata.name for item in limits} if "limit-mem-cpu-disk-per-container" not in limits_names: