Skip to content

Commit

Permalink
object-to-external
Browse files Browse the repository at this point in the history
  • Loading branch information
Kais committed Jul 2, 2024
1 parent 6e39725 commit cf9f5c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def build_metric_value_path(hpa) -> str:
metrics = json.loads(hpa.metadata.annotations["autoscaling.alpha.kubernetes.io/metrics"])
LOGGER.info(f"metrics: {metrics}")
try:
custom_metric = next(m["object"] for m in metrics if m["type"] == "External")
custom_metric = next(m["external"] for m in metrics if m["type"] == "External")
assert not custom_metric.get("selector")
target = custom_metric["target"]
assert target["kind"] == "Service"
Expand Down

0 comments on commit cf9f5c5

Please sign in to comment.