Skip to content

Commit 8d52191

Browse files
committed
doc: docs for secrets sinks config
1 parent 8419c1c commit 8d52191

File tree

6 files changed

+114
-2
lines changed

6 files changed

+114
-2
lines changed

docs/configuration/sinks/DataDog.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,23 @@ Save the file and run
2929
:name: cb-add-discord-sink
3030
3131
helm upgrade robusta robusta/robusta --values=generated_values.yaml
32+
33+
Using Environment Variables for API Keys
34+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
35+
36+
.. code-block:: yaml
37+
38+
runner:
39+
additional_env_vars:
40+
- name: DATADOG_API_KEY
41+
valueFrom:
42+
secretKeyRef:
43+
name: robusta-secrets
44+
key: datadog_key
45+
46+
sinksConfig:
47+
- datadog_sink:
48+
name: datadog_sink
49+
api_key: "{{ env.DATADOG_API_KEY }}"
50+
51+
For more information, see :ref:`Managing Secrets`.

docs/configuration/sinks/Opsgenie.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,29 @@ Save the file and apply the configuration:
5959
6060
helm upgrade robusta robusta/robusta --values=generated_values.yaml
6161
62+
Using Environment Variables for API Keys
63+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
64+
65+
To secure your Opsgenie API key, load it from a Kubernetes Secret:
66+
67+
.. code-block:: yaml
68+
69+
runner:
70+
additional_env_vars:
71+
- name: OPSGENIE_API_KEY
72+
valueFrom:
73+
secretKeyRef:
74+
name: robusta-secrets
75+
key: opsgenie_key
76+
77+
sinksConfig:
78+
- opsgenie_sink:
79+
name: ops_genie_sink
80+
api_key: "{{ env.OPSGENIE_API_KEY }}"
81+
teams: ["noc"]
82+
83+
See :ref:`Managing Secrets` for more information.
84+
6285
**Example Output:**
6386

6487
.. admonition:: Typically you'll send alerts from Robusta to OpsGenie and not deployment changes. We're showing a non-typical example with deployment changes because it helps compare the format with other sinks.

docs/configuration/sinks/PagerDuty.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,28 @@ Save the file and run
5959
6060
helm upgrade robusta robusta/robusta --values=generated_values.yaml
6161
62+
Securing API Keys with Environment Variables
63+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
64+
65+
To keep your PagerDuty integration key secure:
66+
67+
.. code-block:: yaml
68+
69+
runner:
70+
additional_env_vars:
71+
- name: PAGERDUTY_KEY
72+
valueFrom:
73+
secretKeyRef:
74+
name: robusta-secrets
75+
key: pagerduty_key
76+
77+
sinksConfig:
78+
- pagerduty_sink:
79+
name: main_pagerduty_sink
80+
api_key: "{{ env.PAGERDUTY_KEY }}"
81+
82+
See :ref:`Managing Secrets` for complete documentation.
83+
6284
Example Output:
6385

6486
.. admonition:: To view the Alerts, on PagerDuty's dashboard navigate to `Incidents` > `Alerts`

docs/configuration/sinks/index.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ Robusta can send notifications to various destinations, known as sinks.
1313
* :ref:`sinks-overview`
1414
* :ref:`sink-scope-matching`
1515

16+
.. tip::
17+
18+
To secure API keys and tokens in sink configurations, use Kubernetes Secrets with the
19+
``{{ env.VARIABLE_NAME }}`` syntax. See :ref:`Managing Secrets` for details and examples.
20+
1621
Available sinks
1722
^^^^^^^^^^^^^^^^^^^^^
1823
Click a sink for setup instructions.

docs/configuration/sinks/ms-teams.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,28 @@ Configuring the MS Teams sink
2424
2525
Then do a :ref:`Helm Upgrade <Simple Upgrade>`.
2626

27+
Securing Webhook URLs with Environment Variables
28+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
29+
30+
Webhook URLs can contain sensitive information. Store them securely using Kubernetes Secrets:
31+
32+
.. code-block:: yaml
33+
34+
runner:
35+
additional_env_vars:
36+
- name: MSTEAMS_WEBHOOK
37+
valueFrom:
38+
secretKeyRef:
39+
name: robusta-secrets
40+
key: msteams_webhook
41+
42+
sinksConfig:
43+
- ms_teams_sink:
44+
name: main_ms_teams_sink
45+
webhook_url: "{{ env.MSTEAMS_WEBHOOK }}"
46+
47+
For more details, see :ref:`Managing Secrets`.
48+
2749
Obtaining a webhook URL
2850
-----------------------------------
2951

docs/configuration/sinks/slack.rst

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,29 @@ Generate a Slack API key by running ``robusta integrations slack``, then add to
4141
channel_override: DYNAMIC SLACK CHANNEL OVERRIDE (Optional)
4242
investigate_link: true/false # optional, if false no investigate links/buttons will be included in Slack messages
4343
44-
.. warning::
44+
.. tip::
45+
46+
**Recommended: Load API keys from Kubernetes Secrets**
47+
48+
Instead of hardcoding your Slack API key, load it from a Kubernetes Secret:
49+
50+
.. code-block:: yaml
51+
52+
runner:
53+
additional_env_vars:
54+
- name: SLACK_API_KEY
55+
valueFrom:
56+
secretKeyRef:
57+
name: robusta-slack-secrets
58+
key: api_key
59+
60+
sinksConfig:
61+
- slack_sink:
62+
name: main_slack_sink
63+
api_key: "{{ env.SLACK_API_KEY }}"
64+
slack_channel: alerts
4565
46-
If you don't want to put your Slack key in Helm values, you can use a secret. See the :ref:`Managing Secrets <Managing Secrets>` section for more information.
66+
For complete details, see :ref:`Managing Secrets`.
4767

4868
Then do a :ref:`Helm Upgrade <Simple Upgrade>` to apply the new configuration.
4969

0 commit comments

Comments
 (0)