From 6c21510232e09728458a25a7885a927c4350058a Mon Sep 17 00:00:00 2001 From: LeaveMyYard Date: Fri, 6 Oct 2023 14:10:30 +0300 Subject: [PATCH] Add warnings from KRR 1.7 --- playbooks/robusta_playbooks/krr.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/playbooks/robusta_playbooks/krr.py b/playbooks/robusta_playbooks/krr.py index a87606a9f..98865792a 100644 --- a/playbooks/robusta_playbooks/krr.py +++ b/playbooks/robusta_playbooks/krr.py @@ -45,6 +45,7 @@ class KRRObject(BaseModel): namespace: str kind: str allocations: Dict[str, Dict[str, Optional[float]]] + warnings: List[str] = [] class KRRRecommendedInfo(BaseModel): @@ -387,6 +388,7 @@ def krr_scan(event: ExecutionBaseEvent, params: KRRParams): "metric": scan.metrics.get(resource).dict() if scan.metrics.get(resource) else {}, "description": krr_scan.description, "strategy": krr_scan.strategy.dict() if krr_scan.strategy else None, + "warnings": scan.object.warnings, } for resource in krr_scan.resources ],