You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can set the MS Teams webhook url value dynamically, based on the value of a specific ``annotation`` and environmental variable passed to runner.
45
+
46
+
This can be done using the optional ``webhook_override`` sink parameter.
47
+
48
+
As for now, the ``webhook_override`` parameter supports retrieving values specifically from annotations. You can specify an annotation key to retrieve the MS Teams webhook URL using the format ``annotations.<annotation_key>``. For example, if you use ``annotations.ms-team-alerts-sink``, the webhook URL will be taken from an annotation with the key ``ms-team-alerts-sink``.
49
+
50
+
If the specified annotation does not exist, the default webhook URL from the ``webhook_url`` parameter will be used. If the annotation exists but does not contain a URL, the system will look for an environmental variable with the name matching the ``annotation`` value.
51
+
52
+
.. code-block:: yaml
53
+
54
+
sinksConfig:
55
+
# MS Teams integration params
56
+
- ms_teams_sink:
57
+
name: main_ms_teams_sink
58
+
webhook_url: teams-incoming-webhook # see instructions below
A replacement pattern is also allowed, using ``$`` sign, before the variable.
62
+
For cases where labels or annotations include special characters, such as ``${annotations.kubernetes.io/service-name}``, you can use the `${}` replacement pattern to represent the entire key, including special characters.
63
+
For example, if you want to dynamically set the MS Teams webhook url based on the annotation ``kubernetes.io/service-name``, you can use the following syntax:
0 commit comments