create_alertmanager_silence
Create a silence in the cluster's Prometheus Alertmanager so matching alerts stop notifying (Slack, email, ...) until the silence ends. Matchers come from the alert's own labels - always anchor on an exact alertname matcher (e.g. alertname=KubeVersionMismatch) and add narrowing labels like cluster or namespace when known; at least one exact (non-regex) matcher is required. Duration accepts '30m', '2h', '24h', '14d', '2w' (default 2h, maximum 30d - longer suppressions need a human in Alertmanager/Grafana). A comment is required: it is the operator-visible reason shown next to the silence. The silence starts immediately (backdated one minute so it never sits pending) and the response carries the silence id - relay it so the silence can be expired early with expire_alertmanager_silence. The Alertmanager service is auto-discovered; pass namespace/service/port only for non-standard installs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | No | Alertmanager port (default 9093). | |
| comment | Yes | Required operator-visible reason, e.g. 'KubeVersionMismatch on ankra-production - silenced pending version alignment'. | |
| service | No | Alertmanager Service name override (requires namespace). | |
| duration | No | How long the silence lasts: '30m', '2h', '24h', '14d', '2w'. Default 2h, maximum 30d. | |
| matchers | Yes | Label matchers selecting the alerts to silence. Take them from the alert's labels; anchor on alertname. | |
| namespace | No | Namespace to look for Alertmanager in (default: auto-discover across the cluster). | |
| cluster_id | Yes | Ankra cluster id (UUID) the call targets. Discover ids with list_clusters. |