Skip to content

Commit e57f5ea

Browse files
committed
Added holmes to gen_config
1 parent be99429 commit e57f5ea

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

robusta_cli/main.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ class GlobalConfig(BaseModel):
6666
account_id: str = ""
6767

6868

69+
class HolmesConfig(BaseModel):
70+
additional_env_vars: List[Dict[str, str]]
71+
72+
6973
class HelmValues(BaseModel, extra=Extra.allow):
7074
globalConfig: GlobalConfig
7175
sinksConfig: List[Union[SlackSinkConfigWrapper, RobustaSinkConfigWrapper, MsTeamsSinkConfigWrapper]]
@@ -78,6 +82,8 @@ class HelmValues(BaseModel, extra=Extra.allow):
7882
kubewatch: Dict = None
7983
grafanaRenderer: Dict = None
8084
runner: Dict = None
85+
enableHolmesGPT: Optional[bool] = None
86+
holmesConfig: Optional[HolmesConfig] = None
8187

8288

8389
def get_slack_channel() -> str:
@@ -284,6 +290,15 @@ def gen_config(
284290
"prometheusSpec": {"resources": {"requests": {"memory": "300Mi"}, "limits": {"memory": "300Mi"}}},
285291
}
286292

293+
if robusta_api_key:
294+
values.enableHolmesGPT = True
295+
values.holmesConfig = HolmesConfig(additional_env_vars=[
296+
{
297+
"name": "ROBUSTA_AI",
298+
"value": "true"
299+
}
300+
])
301+
287302
write_values_file(output_path, values)
288303

289304
if robusta_api_key:

0 commit comments

Comments
 (0)