robusta-cli 1.0a1__tar.gz → 1.2__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.
- robusta_cli-1.2/PKG-INFO +43 -0
- robusta_cli-1.2/README.md +13 -0
- {robusta_cli-1.0a1 → robusta_cli-1.2}/pyproject.toml +8 -6
- {robusta_cli-1.0a1 → robusta_cli-1.2}/robusta_cli/_version.py +1 -1
- {robusta_cli-1.0a1 → robusta_cli-1.2}/robusta_cli/demo_alert.py +1 -1
- {robusta_cli-1.0a1 → robusta_cli-1.2}/robusta_cli/eula.py +2 -2
- {robusta_cli-1.0a1 → robusta_cli-1.2}/robusta_cli/main.py +96 -13
- robusta_cli-1.0a1/PKG-INFO +0 -30
- robusta_cli-1.0a1/README.md +0 -1
- {robusta_cli-1.0a1 → robusta_cli-1.2}/LICENSE +0 -0
- {robusta_cli-1.0a1 → robusta_cli-1.2}/robusta_cli/__init__.py +0 -0
- {robusta_cli-1.0a1 → robusta_cli-1.2}/robusta_cli/auth.py +0 -0
- {robusta_cli-1.0a1 → robusta_cli-1.2}/robusta_cli/backend_profile.py +0 -0
- {robusta_cli-1.0a1 → robusta_cli-1.2}/robusta_cli/integrations_cmd.py +0 -0
- {robusta_cli-1.0a1 → robusta_cli-1.2}/robusta_cli/playbooks_cmd.py +0 -0
- {robusta_cli-1.0a1 → robusta_cli-1.2}/robusta_cli/self_host.py +0 -0
- {robusta_cli-1.0a1 → robusta_cli-1.2}/robusta_cli/simple_sink_config.py +0 -0
- {robusta_cli-1.0a1 → robusta_cli-1.2}/robusta_cli/slack_feedback_message.py +0 -0
- {robusta_cli-1.0a1 → robusta_cli-1.2}/robusta_cli/slack_verification.py +0 -0
- {robusta_cli-1.0a1 → robusta_cli-1.2}/robusta_cli/utils.py +0 -0
robusta_cli-1.2/PKG-INFO
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: robusta-cli
|
|
3
|
+
Version: 1.2
|
|
4
|
+
Summary:
|
|
5
|
+
Author: Natan Yellin
|
|
6
|
+
Author-email: aantn@users.noreply.github.com
|
|
7
|
+
Requires-Python: >=3.10,<3.13
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
12
|
+
Requires-Dist: certifi (==2024.7.4)
|
|
13
|
+
Requires-Dist: click (==8.1.8)
|
|
14
|
+
Requires-Dist: click-spinner (>=0.1.10,<0.2.0)
|
|
15
|
+
Requires-Dist: cryptography (==46.0.5) ; python_full_version >= "3.9.2" and python_version < "3.13"
|
|
16
|
+
Requires-Dist: dpath (>=2.0.5,<3.0.0)
|
|
17
|
+
Requires-Dist: hikaru-model-28 (>=1.1.0,<2.0.0)
|
|
18
|
+
Requires-Dist: kubernetes (>=29,<30)
|
|
19
|
+
Requires-Dist: pydantic (>=1.0,<2.0)
|
|
20
|
+
Requires-Dist: pyjwt (>=2.12.0,<3.0.0)
|
|
21
|
+
Requires-Dist: pyyaml (>=6.0.1,<7.0.0)
|
|
22
|
+
Requires-Dist: requests (>=2.33.0,<3.0.0)
|
|
23
|
+
Requires-Dist: slack-sdk (>=3,<4)
|
|
24
|
+
Requires-Dist: toml (>=0.10.2,<0.11.0)
|
|
25
|
+
Requires-Dist: typer (>=0.12.3,<0.13.0)
|
|
26
|
+
Requires-Dist: types-toml (>=0.10.2,<0.11.0)
|
|
27
|
+
Requires-Dist: urllib3 (>=2.7.0)
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
|
|
30
|
+
# robusta-cli
|
|
31
|
+
|
|
32
|
+
This project is a CLI tool for using [robusta](https://github.com/robusta-dev/robusta). With this cli tool you can easily:
|
|
33
|
+
|
|
34
|
+
* Generate Helm values for the robusta helm chart, by answering a few questions in a wizard
|
|
35
|
+
* Run diagnostic to see if robusta is running properly
|
|
36
|
+
* Deploy and test your own extensions to Robusta like custom actions and playbooks
|
|
37
|
+
|
|
38
|
+
For more information, checkout the [robusta installation docs](https://docs.robusta.dev/master/).
|
|
39
|
+
|
|
40
|
+
## Requirements
|
|
41
|
+
|
|
42
|
+
- Python 3.9 or higher
|
|
43
|
+
|
|
@@ -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.
|
|
3
|
+
version = "1.2"
|
|
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.
|
|
12
|
+
python = "^3.10, <3.13"
|
|
13
13
|
typer = "^0.12.3"
|
|
14
14
|
pyyaml = "^6.0.1"
|
|
15
15
|
click-spinner = "^0.1.10"
|
|
16
|
-
cryptography = "
|
|
16
|
+
cryptography = {version = "46.0.5", python = ">=3.9.2,<3.13"}
|
|
17
17
|
dpath = "^2.0.5"
|
|
18
18
|
pydantic = "^1.0"
|
|
19
19
|
slack-sdk = "^3"
|
|
20
|
-
pyjwt = "^2.
|
|
21
|
-
requests = "^2.
|
|
22
|
-
certifi = "
|
|
20
|
+
pyjwt = "^2.12.0"
|
|
21
|
+
requests = "^2.33.0"
|
|
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.7.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.
|
|
2
|
+
__version__ = "1.2"
|
|
@@ -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
|
|
8
|
-
require_eula = robusta_api_key
|
|
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
|
|
|
@@ -5,6 +5,7 @@ import subprocess
|
|
|
5
5
|
import time
|
|
6
6
|
import traceback
|
|
7
7
|
import uuid
|
|
8
|
+
from enum import Enum
|
|
8
9
|
from typing import Dict, List, Optional, Union
|
|
9
10
|
|
|
10
11
|
import certifi
|
|
@@ -61,23 +62,85 @@ app.add_typer(auth_commands, name="auth", help="Authentication commands menu")
|
|
|
61
62
|
app.add_typer(self_host_commands, name="self-host", help="Self-host commands menu")
|
|
62
63
|
|
|
63
64
|
|
|
65
|
+
class ClusterSize(str, Enum):
|
|
66
|
+
small = "small"
|
|
67
|
+
medium = "medium"
|
|
68
|
+
large = "large"
|
|
69
|
+
|
|
70
|
+
# Resource configurations per cluster size (by CPU count):
|
|
71
|
+
# small: < 16 CPUs
|
|
72
|
+
# medium: 16-128 CPUs
|
|
73
|
+
# large: > 128 CPUs
|
|
74
|
+
CLUSTER_SIZE_RESOURCES = {
|
|
75
|
+
"small": {
|
|
76
|
+
"kubewatch": {
|
|
77
|
+
"requests": {"memory": "128Mi", "cpu": "50m"},
|
|
78
|
+
"limits": {"memory": "128Mi"},
|
|
79
|
+
},
|
|
80
|
+
"runner": {
|
|
81
|
+
"requests": {"memory": "1Gi", "cpu": "100m"},
|
|
82
|
+
"limits": {"memory": "1536Mi"},
|
|
83
|
+
},
|
|
84
|
+
"holmes": {
|
|
85
|
+
"requests": {"memory": "1Gi", "cpu": "100m"},
|
|
86
|
+
"limits": {"memory": "1Gi"},
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
"medium": {
|
|
90
|
+
"kubewatch": {
|
|
91
|
+
"requests": {"memory": "256Mi", "cpu": "100m"},
|
|
92
|
+
"limits": {"memory": "256Mi"},
|
|
93
|
+
},
|
|
94
|
+
"runner": {
|
|
95
|
+
"requests": {"memory": "2Gi", "cpu": "500m"},
|
|
96
|
+
"limits": {"memory": "4Gi"},
|
|
97
|
+
},
|
|
98
|
+
"holmes": {
|
|
99
|
+
"requests": {"memory": "2Gi", "cpu": "250m"},
|
|
100
|
+
"limits": {"memory": "4Gi"},
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
"large": {
|
|
104
|
+
"kubewatch": {
|
|
105
|
+
"requests": {"memory": "1Gi", "cpu": "200m"},
|
|
106
|
+
"limits": {"memory": "1Gi"},
|
|
107
|
+
},
|
|
108
|
+
"runner": {
|
|
109
|
+
"requests": {"memory": "4Gi", "cpu": "1000m"},
|
|
110
|
+
"limits": {"memory": "6Gi"},
|
|
111
|
+
},
|
|
112
|
+
"holmes": {
|
|
113
|
+
"requests": {"memory": "2Gi", "cpu": "500m"},
|
|
114
|
+
"limits": {"memory": "4Gi"},
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
|
|
64
120
|
class GlobalConfig(BaseModel):
|
|
65
121
|
signing_key: str = ""
|
|
66
122
|
account_id: str = ""
|
|
67
123
|
|
|
68
124
|
|
|
125
|
+
class HolmesConfig(BaseModel):
|
|
126
|
+
additional_env_vars: List[Dict[str, str]]
|
|
127
|
+
resources: Optional[Dict] = None
|
|
128
|
+
|
|
129
|
+
|
|
69
130
|
class HelmValues(BaseModel, extra=Extra.allow):
|
|
70
131
|
globalConfig: GlobalConfig
|
|
71
132
|
sinksConfig: List[Union[SlackSinkConfigWrapper, RobustaSinkConfigWrapper, MsTeamsSinkConfigWrapper]]
|
|
72
133
|
clusterName: Optional[str] = None
|
|
73
134
|
isSmallCluster: Optional[bool] = None
|
|
74
135
|
enablePrometheusStack: bool = False
|
|
75
|
-
disableCloudRouting: bool = False
|
|
76
136
|
enablePlatformPlaybooks: bool = False
|
|
137
|
+
enabledManagedConfiguration: bool = False
|
|
77
138
|
playbooksPersistentVolumeSize: str = None
|
|
78
139
|
kubewatch: Dict = None
|
|
79
140
|
grafanaRenderer: Dict = None
|
|
80
141
|
runner: Dict = None
|
|
142
|
+
enableHolmesGPT: Optional[bool] = None
|
|
143
|
+
holmes: Optional[HolmesConfig] = None
|
|
81
144
|
|
|
82
145
|
|
|
83
146
|
def get_slack_channel() -> str:
|
|
@@ -108,7 +171,11 @@ def gen_config(
|
|
|
108
171
|
),
|
|
109
172
|
is_small_cluster: bool = typer.Option(
|
|
110
173
|
None,
|
|
111
|
-
help="Local/Small cluster",
|
|
174
|
+
help="[Deprecated: use --cluster-size] Local/Small cluster",
|
|
175
|
+
),
|
|
176
|
+
cluster_size: Optional[ClusterSize] = typer.Option(
|
|
177
|
+
None,
|
|
178
|
+
help="Cluster size: small (< 16 CPUs), medium (16-128 CPUs), large (> 128 CPUs)",
|
|
112
179
|
),
|
|
113
180
|
slack_api_key: str = typer.Option(
|
|
114
181
|
"",
|
|
@@ -124,7 +191,6 @@ def gen_config(
|
|
|
124
191
|
),
|
|
125
192
|
robusta_api_key: str = typer.Option(None),
|
|
126
193
|
enable_prometheus_stack: bool = typer.Option(None),
|
|
127
|
-
disable_cloud_routing: bool = typer.Option(None),
|
|
128
194
|
output_path: str = typer.Option("./generated_values.yaml", help="Output path of generated Helm values"),
|
|
129
195
|
debug: bool = typer.Option(False),
|
|
130
196
|
context: str = typer.Option(
|
|
@@ -211,7 +277,6 @@ def gen_config(
|
|
|
211
277
|
RobustaSinkConfigWrapper(robusta_sink=RobustaSinkParams(name="robusta_ui_sink", token=robusta_api_key))
|
|
212
278
|
] + sinks_config
|
|
213
279
|
enable_platform_playbooks = True
|
|
214
|
-
disable_cloud_routing = False
|
|
215
280
|
|
|
216
281
|
slack_feedback_heads_up_message: Optional[str] = None
|
|
217
282
|
# When using custom certificates we do not want to add the extra slack message.
|
|
@@ -233,12 +298,7 @@ def gen_config(
|
|
|
233
298
|
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
299
|
)
|
|
235
300
|
|
|
236
|
-
|
|
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)
|
|
301
|
+
handle_eula(account_id, robusta_api_key)
|
|
242
302
|
|
|
243
303
|
if enable_crash_report is None:
|
|
244
304
|
enable_crash_report = typer.confirm(
|
|
@@ -249,12 +309,11 @@ def gen_config(
|
|
|
249
309
|
|
|
250
310
|
values = HelmValues(
|
|
251
311
|
clusterName=cluster_name,
|
|
252
|
-
isSmallCluster=is_small_cluster,
|
|
253
312
|
globalConfig=GlobalConfig(signing_key=signing_key, account_id=account_id),
|
|
254
313
|
sinksConfig=sinks_config,
|
|
255
314
|
enablePrometheusStack=enable_prometheus_stack,
|
|
256
|
-
disableCloudRouting=disable_cloud_routing,
|
|
257
315
|
enablePlatformPlaybooks=enable_platform_playbooks,
|
|
316
|
+
enabledManagedConfiguration=True if robusta_api_key else False,
|
|
258
317
|
)
|
|
259
318
|
|
|
260
319
|
values.runner = {}
|
|
@@ -275,9 +334,33 @@ def gen_config(
|
|
|
275
334
|
"name": "ROBUSTA_TELEMETRY_ENDPOINT",
|
|
276
335
|
"value": backend_profile.robusta_telemetry_endpoint,
|
|
277
336
|
},
|
|
337
|
+
{
|
|
338
|
+
"name": "ROBUSTA_API_ENDPOINT",
|
|
339
|
+
"value": backend_profile.robusta_cloud_api_host,
|
|
340
|
+
},
|
|
278
341
|
]
|
|
279
342
|
|
|
280
|
-
if
|
|
343
|
+
if robusta_api_key:
|
|
344
|
+
values.enableHolmesGPT = True
|
|
345
|
+
values.holmes = HolmesConfig(additional_env_vars=[
|
|
346
|
+
{
|
|
347
|
+
"name": "ROBUSTA_AI",
|
|
348
|
+
"value": "true"
|
|
349
|
+
}
|
|
350
|
+
])
|
|
351
|
+
|
|
352
|
+
# cluster_size (new) and is_small_cluster (legacy) are mutually exclusive
|
|
353
|
+
if cluster_size:
|
|
354
|
+
size_resources = CLUSTER_SIZE_RESOURCES.get(cluster_size.value)
|
|
355
|
+
if size_resources:
|
|
356
|
+
if "kubewatch" in size_resources:
|
|
357
|
+
values.kubewatch = {"resources": size_resources["kubewatch"]}
|
|
358
|
+
if "runner" in size_resources:
|
|
359
|
+
values.runner["resources"] = size_resources["runner"]
|
|
360
|
+
if "holmes" in size_resources and values.holmes:
|
|
361
|
+
values.holmes.resources = size_resources["holmes"]
|
|
362
|
+
elif is_small_cluster:
|
|
363
|
+
values.isSmallCluster = is_small_cluster
|
|
281
364
|
setattr(values, "kube-prometheus-stack", {})
|
|
282
365
|
kube_stack = getattr(values, "kube-prometheus-stack")
|
|
283
366
|
kube_stack["prometheus"] = {
|
robusta_cli-1.0a1/PKG-INFO
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: robusta-cli
|
|
3
|
-
Version: 1.0a1
|
|
4
|
-
Summary:
|
|
5
|
-
Author: Natan Yellin
|
|
6
|
-
Author-email: aantn@users.noreply.github.com
|
|
7
|
-
Requires-Python: >=3.8,<3.13
|
|
8
|
-
Classifier: Programming Language :: Python :: 3
|
|
9
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
10
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
-
Requires-Dist: certifi (>=2024.2.2,<2025.0.0)
|
|
15
|
-
Requires-Dist: click-spinner (>=0.1.10,<0.2.0)
|
|
16
|
-
Requires-Dist: cryptography (>=42.0.7,<43.0.0)
|
|
17
|
-
Requires-Dist: dpath (>=2.0.5,<3.0.0)
|
|
18
|
-
Requires-Dist: hikaru-model-28 (>=1.1.0,<2.0.0)
|
|
19
|
-
Requires-Dist: kubernetes (>=29,<30)
|
|
20
|
-
Requires-Dist: pydantic (>=1.0,<2.0)
|
|
21
|
-
Requires-Dist: pyjwt (>=2.4.0,<3.0.0)
|
|
22
|
-
Requires-Dist: pyyaml (>=6.0.1,<7.0.0)
|
|
23
|
-
Requires-Dist: requests (>=2.32.2,<3.0.0)
|
|
24
|
-
Requires-Dist: slack-sdk (>=3,<4)
|
|
25
|
-
Requires-Dist: toml (>=0.10.2,<0.11.0)
|
|
26
|
-
Requires-Dist: typer (>=0.12.3,<0.13.0)
|
|
27
|
-
Requires-Dist: types-toml (>=0.10.2,<0.11.0)
|
|
28
|
-
Description-Content-Type: text/markdown
|
|
29
|
-
|
|
30
|
-
# robusta-cli
|
robusta_cli-1.0a1/README.md
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
# robusta-cli
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|