Repository navigation
api: add post_updates_to_thread to VMAlertmanagerConfig Slack receiver - #2580
Conversation
259a7b8 to
d51f1f0
Compare
d51f1f0 to
5ebcc0f
Compare
|
Update: Alertmanager v0.35.0 has not been released yet, so no official release supports this new field. |
|
Similar to other alertmanager PRs (#2707) we should introduce a version check and a manual override so that this option could not be used with Alertmanager which doesn't support it |
5ebcc0f to
e366235
Compare
|
@vrutkovs Added in e366235: a VMAlertmanagerConfig setting |
| // Requires Slack Bot API and chat:write scope. | ||
| // Available since alertmanager v0.35.0. | ||
| // +optional | ||
| PostUpdatesToThread *bool `json:"post_updates_to_thread,omitempty" yaml:"post_updates_to_thread,omitempty"` |
There was a problem hiding this comment.
| PostUpdatesToThread *bool `json:"post_updates_to_thread,omitempty" yaml:"post_updates_to_thread,omitempty"` | |
| // +notes={available_from: "v0.76.0"} | |
| PostUpdatesToThread *bool `json:"post_updates_to_thread,omitempty" yaml:"post_updates_to_thread,omitempty"` |
This would show implementation version in thje focs
| EnableDefaultPreStopHook bool `default:"true" env:"VM_ENABLE_DEFAULT_PRESTOP_HOOK"` | ||
| // Skips checks of the Alertmanager image tag against the minimal version required by configured features. | ||
| // Useful for custom builds with a release-like tag that already contain the required features. | ||
| DisableAlertmanagerVersionCheck bool `default:"false" env:"VM_DISABLE_ALERTMANAGER_VERSION_CHECK"` |
There was a problem hiding this comment.
Sorry, I pointed you to a different PR. Instead of fully disabling vmalertmanager version check, we'd rather have a way to skip this particular check
3e36f23 to
1c80468
Compare
|
@Haleygo Alertmanager v0.35.0 is out (2026-11-09). 1c80468 bumps the vendored module in |
Exposes the upcoming alertmanager slack_configs option post_updates_to_thread (prometheus/alertmanager#5540), which posts subsequent notifications for an alert group as replies in the thread of the initial Slack message. Follows the same pattern as update_message.
…than v0.35.0 A VMAlertmanagerConfig with slack_configs post_updates_to_thread is marked invalid for a VMAlertmanager whose image tag is below v0.35.0, since older releases fail to load a config with the unknown field. The check runs per VMAlertmanager, as one VMAlertmanagerConfig may be selected by several. Non-semver tags are treated as supported, and the check can be skipped for custom builds with VM_DISABLE_ALERTMANAGER_VERSION_CHECK=true. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Sébastien GLON <[email protected]>
Replace the operator-wide VM_DISABLE_ALERTMANAGER_VERSION_CHECK with VM_VMALERTMANAGER_SLACK_POST_UPDATES_TO_THREAD_SUPPORT, which only declares support for this field, following the vmauth access_log.headers pattern. Tags that are not a version are now treated as unsupported unless the flag is set. Document the operator version the field is available from. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Sébastien GLON <[email protected]>
v0.35.0 is the first release with slack_configs post_updates_to_thread (prometheus/alertmanager#5540). Bump the vendored module in both go.mod files and the default VM_ALERTMANAGER_VERSION. featurecontrol.Flagger gained EnableMutedAlertsInNflog and dropped EnableAutoGOMAXPROCS, so update the no-op flagger accordingly and add a compile-time interface assertion. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Sébastien GLON <[email protected]>
1c80468 to
284747e
Compare
Describe Your Changes
Adds the upcoming alertmanager
slack_configsoptionpost_updates_to_threadto theVMAlertmanagerConfigSlack receiver, following the exact same pattern asupdate_message:api/operator/v1beta1: new optionalpost_updates_to_thread(*bool) field onSlackConfig, plus regenerated deepcopy, CRDs anddocs/api.md.factory/vmalertmanager/config.go: render the key into the generated alertmanager configuration only when set.When enabled, alertmanager posts subsequent notifications for an alert group (resolved, repeats) as replies in the thread of the initial Slack message instead of new channel messages; combined with
update_message, the initial message is updated in place and a reply is also posted to its thread.Note: the upstream alertmanager feature prometheus/alertmanager#5540 has been merged (2026-09-29) and will ship in alertmanager v0.35.0. The key name
post_updates_to_threadis unchanged from the merged version. The branch is rebased on currentmaster.Checklist
go test ./internal/controller/operator/factory/vmalertmanager/...and api module tests pass)make docs)🤖 Generated with Claude Code