Skip to content

Commit

Permalink
Merge branch 'u/krall/limitrange_paastasvc-'
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanKrall committed Oct 27, 2023
2 parents 6e0ae13 + f332ae6 commit 1b0fea4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions paasta_tools/kubernetes_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 1b0fea4

Please sign in to comment.