Skip to content

Commit 5734418

Browse files
Merge branch 'master' into cluster-label-docs
2 parents fc01230 + e5a73ba commit 5734418

File tree

8 files changed

+115
-5
lines changed

8 files changed

+115
-5
lines changed

docs/configuration/holmesgpt/builtin_toolsets.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ by the user by providing credentials or API keys to external systems.
6363
:link: toolsets/helm
6464
:link-type: doc
6565

66+
.. grid-item-card:: :octicon:`cpu;1em;` Internet
67+
:class-card: sd-bg-light sd-bg-text-light
68+
:link: toolsets/internet
69+
:link-type: doc
70+
6671
.. grid-item-card:: :octicon:`cpu;1em;` Kubernetes
6772
:class-card: sd-bg-light sd-bg-text-light
6873
:link: toolsets/kubernetes

docs/configuration/holmesgpt/toolsets/argocd.rst

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,61 @@ and configuration of ArgoCD applications.
77
Configuration
88
-------------
99

10-
This toolset requires an ``ARGOCD_AUTH_TOKEN`` environment variable as described in
11-
the `argocd documentation <https://argo-cd.readthedocs.io/en/latest/user-guide/commands/argocd_account_generate-token/>`_.
10+
This toolset requires an ``ARGOCD_AUTH_TOKEN`` environment variable. Generate such auth token by following
11+
`these steps <https://argo-cd.readthedocs.io/en/latest/user-guide/commands/argocd_account_generate-token/>`_.
12+
You can consult the `available environment variables <https://argo-cd.readthedocs.io/en/latest/user-guide/environment-variables/>`_
13+
on argocd's official documentation for the CLI.
14+
15+
In addition to the auth token, you will need to tell argocd how to connect to the server. This can be done two ways:
16+
17+
1. **Using port forwarding**. This is the recommended approach if your argocd is inside your Kubernetes cluster.
18+
2. **Setting the env var** ``SERVER_URL``. This is the recommended approach if your argocd is reachable through a public DNS
19+
20+
1. Port forwarding
21+
^^^^^^^^^^^^^^^^^^
22+
23+
This is the recommended approach if your argocd is inside your Kubernetes cluster.
24+
25+
HolmesGPT needs permission to establish a port-forward to ArgoCD. The configuration below includes that authorization.
26+
27+
.. code-block:: yaml
28+
29+
holmes:
30+
customClusterRoleRules:
31+
- apiGroups: [""]
32+
resources: ["pods/portforward"]
33+
verbs: ["create"]
34+
additionalEnvVars:
35+
- name: ARGOCD_AUTH_TOKEN
36+
value: <your argocd auth token>
37+
- name: ARGOCD_OPTS
38+
value: "--port-forward --port-forward-namespace <your_argocd_namespace> --grpc-web"
39+
toolsets:
40+
argocd/core:
41+
enabled: true
42+
43+
.. note::
44+
45+
Change the namespace ``--port-forward-namespace <your_argocd_namespace>`` to the namespace in which your argocd service
46+
is deployed.
47+
48+
The option ``--grpc-web`` in ``ARGOCD_OPTS`` prevents some connection errors from leaking into the tool responses and
49+
provides a cleaner output for HolmesGPT.
50+
51+
52+
2. Server URL
53+
^^^^^^^^^^^^^
54+
55+
This is the recommended approach if your argocd is reachable through a public DNS.
1256

1357
.. code-block:: yaml
1458
1559
holmes:
1660
additionalEnvVars:
1761
- name: ARGOCD_AUTH_TOKEN
1862
value: <your argocd auth token>
63+
- name: ARGOCD_SERVER
64+
value: argocd.example.com
1965
toolsets:
2066
argocd/core:
2167
enabled: true

docs/configuration/holmesgpt/toolsets/helm.rst

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,22 @@ Configuration
1212
toolsets:
1313
helm/core:
1414
enabled: true
15+
customClusterRoleRules:
16+
- apiGroups: [""]
17+
resources: ["secrets", "pods", "services", "configmaps", "persistentvolumeclaims"]
18+
verbs: ["get", "list", "watch"]
19+
- apiGroups: [""]
20+
resources: ["namespaces"]
21+
verbs: ["get"]
22+
- apiGroups: ["apps"]
23+
resources: ["deployments", "statefulsets", "daemonsets"]
24+
verbs: ["get", "list", "watch"]
25+
- apiGroups: ["batch"]
26+
resources: ["jobs", "cronjobs"]
27+
verbs: ["get", "list", "watch"]
28+
- apiGroups: ["networking.k8s.io"]
29+
resources: ["ingresses"]
30+
verbs: ["get", "list", "watch"]
1531
1632
.. include:: ./_toolset_configuration.inc.rst
1733

@@ -38,6 +54,6 @@ Capabilities
3854
* - helm_hooks
3955
- Get the hooks for a Helm release
4056
* - helm_chart
41-
- Get the hooks for a Helm release
57+
- Show the chart used to create a Helm release
4258
* - helm_notes
4359
- Show the notes provided by the Helm chart

docs/configuration/holmesgpt/toolsets/kubernetes.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,13 @@ Configuration
143143
.. code-block:: yaml
144144
145145
holmes:
146+
customClusterRoleRules:
147+
- apiGroups:
148+
- ""
149+
resources:
150+
- services/proxy
151+
verbs:
152+
- get
146153
toolsets:
147154
kubernetes/kube-prometheus-stack:
148155
enabled: true

docs/configuration/sinks/ms-teams.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,20 @@ Example:
7777
name: main_ms_teams_sink
7878
webhook_url: teams-incoming-webhook # see instructions below
7979
webhook_override: ${annotations.kubernetes.io/service-name}
80+
81+
Redirect to Platform
82+
-------------------------------------------------------------------
83+
84+
By default, MS Teams notifications include buttons to view more information in the Robusta SaaS platform.
85+
If you don't use Robusta SaaS you can modify these links to point at Prometheus instead.
86+
To do so, set prefer_redirect_to_platform: false.
87+
88+
For example:
89+
90+
.. code-block:: yaml
91+
92+
sinks_config:
93+
- ms_teams_sink:
94+
name: main_ms_teams_sink
95+
webhook_url: teams-incoming-webhook
96+
prefer_redirect_to_platform: false

docs/configuration/sinks/slack.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,25 @@ Example:
9595
slack_channel: my-fallback-channel
9696
channel_override: "$cluster_name-alerts-$labels.env-${annotations.kubernetes.io/service-name}"
9797
98+
Redirect to Platform
99+
-------------------------------------------------------------------
100+
101+
By default, Slack notifications include buttons to view more information in the Robusta SaaS platform.
102+
If you don't use Robusta SaaS you can modify these links to point at Prometheus instead.
103+
To do so, set prefer_redirect_to_platform: false.
104+
105+
For example:
106+
107+
.. code-block:: yaml
108+
109+
sinks_config:
110+
# slack integration params
111+
- slack_sink:
112+
name: main_slack_sink
113+
api_key: xoxb-112...
114+
slack_channel: my-fallback-channel
115+
prefer_redirect_to_platform: false
116+
98117
99118
Using Private Channels
100119
-------------------------------------------------------------------

src/robusta/integrations/msteams/msteams_msg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def _add_actions(self, platform_enabled: bool, finding: Finding, cluster_name: s
6767

6868
for link in finding.links:
6969
link_url = link.url
70-
if link.type == LinkType.PROMETHEUS_GENERATOR_URL and self.prefer_redirect_to_platform:
70+
if link.type == LinkType.PROMETHEUS_GENERATOR_URL and self.prefer_redirect_to_platform and platform_enabled:
7171
link_url = convert_prom_graph_url_to_robusta_metrics_explorer(link.url, cluster_name, account_id)
7272
action: str = f"[{link.link_text}]({link_url})"
7373
actions.append(action)

src/robusta/integrations/slack/sender.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ def __create_links(
411411

412412
for link in finding.links:
413413
link_url = link.url
414-
if link.type == LinkType.PROMETHEUS_GENERATOR_URL and prefer_redirect_to_platform:
414+
if link.type == LinkType.PROMETHEUS_GENERATOR_URL and prefer_redirect_to_platform and platform_enabled:
415415
link_url = convert_prom_graph_url_to_robusta_metrics_explorer(
416416
link.url, self.cluster_name, self.account_id
417417
)

0 commit comments

Comments
 (0)