Skip to content

Commit

Permalink
fixed scaler logic
Browse files Browse the repository at this point in the history
  • Loading branch information
JTaeuber committed Nov 14, 2024
1 parent d1678d8 commit 9e95eda
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kube_downscaler/scaler.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,9 +520,9 @@ def scale_down_jobs(
operation = "no_scale"
if admission_controller == "kyverno":
# if the matching_labels FrozenSet has an empty string as the first element, we create a different kyverno policy
first_element = next(iter(matching_labels), None)
first_element_str = first_element.pattern
if first_element_str == "":
first_element = next(iter(matching_labels), "")

if first_element == "":
has_matching_labels_arg = False
else:
has_matching_labels_arg = True
Expand Down

0 comments on commit 9e95eda

Please sign in to comment.