robusta-cli 1.0a0__tar.gz → 1.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,19 +1,19 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: robusta-cli
3
- Version: 1.0a0
3
+ Version: 1.1
4
4
  Summary:
5
5
  Author: Natan Yellin
6
6
  Author-email: aantn@users.noreply.github.com
7
- Requires-Python: >=3.8,<3.13
7
+ Requires-Python: >=3.9,<3.13
8
8
  Classifier: Programming Language :: Python :: 3
9
- Classifier: Programming Language :: Python :: 3.8
10
9
  Classifier: Programming Language :: Python :: 3.9
11
10
  Classifier: Programming Language :: Python :: 3.10
12
11
  Classifier: Programming Language :: Python :: 3.11
13
12
  Classifier: Programming Language :: Python :: 3.12
14
- Requires-Dist: certifi (>=2024.2.2,<2025.0.0)
13
+ Requires-Dist: certifi (==2024.7.4)
14
+ Requires-Dist: click (==8.1.8)
15
15
  Requires-Dist: click-spinner (>=0.1.10,<0.2.0)
16
- Requires-Dist: cryptography (>=42.0.7,<43.0.0)
16
+ Requires-Dist: cryptography (==43.0.1)
17
17
  Requires-Dist: dpath (>=2.0.5,<3.0.0)
18
18
  Requires-Dist: hikaru-model-28 (>=1.1.0,<2.0.0)
19
19
  Requires-Dist: kubernetes (>=29,<30)
@@ -25,6 +25,20 @@ Requires-Dist: slack-sdk (>=3,<4)
25
25
  Requires-Dist: toml (>=0.10.2,<0.11.0)
26
26
  Requires-Dist: typer (>=0.12.3,<0.13.0)
27
27
  Requires-Dist: types-toml (>=0.10.2,<0.11.0)
28
+ Requires-Dist: urllib3 (>2.6.0)
28
29
  Description-Content-Type: text/markdown
29
30
 
30
31
  # robusta-cli
32
+
33
+ This project is a CLI tool for using [robusta](https://github.com/robusta-dev/robusta). With this cli tool you can easily:
34
+
35
+ * Generate Helm values for the robusta helm chart, by answering a few questions in a wizard
36
+ * Run diagnostic to see if robusta is running properly
37
+ * Deploy and test your own extensions to Robusta like custom actions and playbooks
38
+
39
+ For more information, checkout the [robusta installation docs](https://docs.robusta.dev/master/).
40
+
41
+ ## Requirements
42
+
43
+ - Python 3.9 or higher
44
+
@@ -0,0 +1,13 @@
1
+ # robusta-cli
2
+
3
+ This project is a CLI tool for using [robusta](https://github.com/robusta-dev/robusta). With this cli tool you can easily:
4
+
5
+ * Generate Helm values for the robusta helm chart, by answering a few questions in a wizard
6
+ * Run diagnostic to see if robusta is running properly
7
+ * Deploy and test your own extensions to Robusta like custom actions and playbooks
8
+
9
+ For more information, checkout the [robusta installation docs](https://docs.robusta.dev/master/).
10
+
11
+ ## Requirements
12
+
13
+ - Python 3.9 or higher
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "robusta-cli"
3
- version = "1.0-alpha"
3
+ version = "1.1"
4
4
  description = ""
5
5
  authors = ["Natan Yellin <aantn@users.noreply.github.com>"]
6
6
  readme = "README.md"
@@ -9,21 +9,23 @@ readme = "README.md"
9
9
  robusta = "robusta_cli.main:app"
10
10
 
11
11
  [tool.poetry.dependencies]
12
- python = "^3.8, <3.13"
12
+ python = "^3.9, <3.13"
13
13
  typer = "^0.12.3"
14
14
  pyyaml = "^6.0.1"
15
15
  click-spinner = "^0.1.10"
16
- cryptography = "^42.0.7"
16
+ cryptography = "43.0.1"
17
17
  dpath = "^2.0.5"
18
18
  pydantic = "^1.0"
19
19
  slack-sdk = "^3"
20
20
  pyjwt = "^2.4.0"
21
21
  requests = "^2.32.2"
22
- certifi = "^2024.2.2"
22
+ certifi = "2024.7.4"
23
23
  types-toml = "^0.10.2"
24
24
  toml = "^0.10.2"
25
25
  hikaru-model-28 = "^1.1.0"
26
26
  kubernetes = "^29"
27
+ urllib3 = ">2.6.0"
28
+ click = "8.1.8"
27
29
 
28
30
 
29
31
  [build-system]
@@ -1,2 +1,2 @@
1
1
  # this is updated by .github/workflows/release.yaml
2
- __version__ = "1.0-alpha"
2
+ __version__ = "1.1"
@@ -121,7 +121,7 @@ def create_demo_alert(
121
121
  "curl",
122
122
  "-X",
123
123
  "POST",
124
- f"{alertmanager_url}/api/v1/alerts",
124
+ f"{alertmanager_url}/api/v2/alerts",
125
125
  "-H",
126
126
  "Content-Type: application/json",
127
127
  "-d",
@@ -4,8 +4,8 @@ import typer
4
4
  from robusta_cli.backend_profile import backend_profile
5
5
 
6
6
 
7
- def handle_eula(account_id, robusta_api_key, cloud_routing_enabled):
8
- require_eula = robusta_api_key or cloud_routing_enabled
7
+ def handle_eula(account_id, robusta_api_key):
8
+ require_eula = robusta_api_key
9
9
  if not require_eula:
10
10
  return
11
11
 
@@ -66,18 +66,24 @@ class GlobalConfig(BaseModel):
66
66
  account_id: str = ""
67
67
 
68
68
 
69
+ class HolmesConfig(BaseModel):
70
+ additional_env_vars: List[Dict[str, str]]
71
+
72
+
69
73
  class HelmValues(BaseModel, extra=Extra.allow):
70
74
  globalConfig: GlobalConfig
71
75
  sinksConfig: List[Union[SlackSinkConfigWrapper, RobustaSinkConfigWrapper, MsTeamsSinkConfigWrapper]]
72
76
  clusterName: Optional[str] = None
73
77
  isSmallCluster: Optional[bool] = None
74
78
  enablePrometheusStack: bool = False
75
- disableCloudRouting: bool = False
76
79
  enablePlatformPlaybooks: bool = False
80
+ enabledManagedConfiguration: bool = False
77
81
  playbooksPersistentVolumeSize: str = None
78
82
  kubewatch: Dict = None
79
83
  grafanaRenderer: Dict = None
80
84
  runner: Dict = None
85
+ enableHolmesGPT: Optional[bool] = None
86
+ holmes: Optional[HolmesConfig] = None
81
87
 
82
88
 
83
89
  def get_slack_channel() -> str:
@@ -124,7 +130,6 @@ def gen_config(
124
130
  ),
125
131
  robusta_api_key: str = typer.Option(None),
126
132
  enable_prometheus_stack: bool = typer.Option(None),
127
- disable_cloud_routing: bool = typer.Option(None),
128
133
  output_path: str = typer.Option("./generated_values.yaml", help="Output path of generated Helm values"),
129
134
  debug: bool = typer.Option(False),
130
135
  context: str = typer.Option(
@@ -211,7 +216,6 @@ def gen_config(
211
216
  RobustaSinkConfigWrapper(robusta_sink=RobustaSinkParams(name="robusta_ui_sink", token=robusta_api_key))
212
217
  ] + sinks_config
213
218
  enable_platform_playbooks = True
214
- disable_cloud_routing = False
215
219
 
216
220
  slack_feedback_heads_up_message: Optional[str] = None
217
221
  # When using custom certificates we do not want to add the extra slack message.
@@ -233,12 +237,7 @@ def gen_config(
233
237
  f"""If you haven't installed it yet, Robusta can install a pre-configured {typer.style("Prometheus", fg=typer.colors.YELLOW, bold=True)}.\nWould you like to do so?"""
234
238
  )
235
239
 
236
- if disable_cloud_routing is None:
237
- disable_cloud_routing = not typer.confirm(
238
- "Would you like to enable two-way interactivity (e.g. fix-it buttons in Slack) via Robusta's cloud?"
239
- )
240
-
241
- handle_eula(account_id, robusta_api_key, not disable_cloud_routing)
240
+ handle_eula(account_id, robusta_api_key)
242
241
 
243
242
  if enable_crash_report is None:
244
243
  enable_crash_report = typer.confirm(
@@ -253,8 +252,8 @@ def gen_config(
253
252
  globalConfig=GlobalConfig(signing_key=signing_key, account_id=account_id),
254
253
  sinksConfig=sinks_config,
255
254
  enablePrometheusStack=enable_prometheus_stack,
256
- disableCloudRouting=disable_cloud_routing,
257
255
  enablePlatformPlaybooks=enable_platform_playbooks,
256
+ enabledManagedConfiguration=True if robusta_api_key else False,
258
257
  )
259
258
 
260
259
  values.runner = {}
@@ -284,6 +283,15 @@ def gen_config(
284
283
  "prometheusSpec": {"resources": {"requests": {"memory": "300Mi"}, "limits": {"memory": "300Mi"}}},
285
284
  }
286
285
 
286
+ if robusta_api_key:
287
+ values.enableHolmesGPT = True
288
+ values.holmes = HolmesConfig(additional_env_vars=[
289
+ {
290
+ "name": "ROBUSTA_AI",
291
+ "value": "true"
292
+ }
293
+ ])
294
+
287
295
  write_values_file(output_path, values)
288
296
 
289
297
  if robusta_api_key:
@@ -1 +0,0 @@
1
- # robusta-cli
File without changes