Skip to content

Commit

Permalink
Merge branch 'main' into fix-json-quiet-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
aantn authored Mar 4, 2024
2 parents d62bbe1 + ae80181 commit 85a3bba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ async def load_pods(self, object: K8sObjectData, period: datetime.timedelta) ->
}}[{period_literal}]
"""
)
replicasets = replicasets["result"]
pod_owners = [replicaset["metric"]["replicaset"] for replicaset in replicasets]
pod_owner_kind = "ReplicaSet"

Expand All @@ -211,6 +212,7 @@ async def load_pods(self, object: K8sObjectData, period: datetime.timedelta) ->
)
"""
)
related_pods_result = related_pods_result["result"]

if related_pods_result == []:
return []
Expand All @@ -231,6 +233,7 @@ async def load_pods(self, object: K8sObjectData, period: datetime.timedelta) ->
}} == 1
"""
)
pods_status_result = pods_status_result["result"]
current_pods_set |= {pod["metric"]["pod"] for pod in pods_status_result}
del pods_status_result

Expand Down
2 changes: 2 additions & 0 deletions robusta_krr/strategies/simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ class SimpleStrategy(BaseStrategy[SimpleStrategySettings]):
History: {history_duration} hours
Step: {timeframe_duration} minutes
All parameters can be customized. For example: `krr simple --cpu_percentile=90 --memory_buffer_percentage=15 --history_duration=24 --timeframe_duration=0.5`
This strategy does not work with objects with HPA defined (Horizontal Pod Autoscaler).
If HPA is defined for CPU or Memory, the strategy will return "?" for that resource.
Expand Down

0 comments on commit 85a3bba

Please sign in to comment.