Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions api/operator/v1beta1/vmalertmanagerconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -900,6 +900,14 @@ type SlackConfig struct {
// Available since alertmanager v0.32.0.
// +optional
UpdateMessage *bool `json:"update_message,omitempty" yaml:"update_message,omitempty"`
// Whether to post subsequent notifications for an alert group as replies
// in the thread of the initial message, instead of new channel messages.
// Can be combined with update_message to update the initial message in-place
// and also post a reply to its thread.
// 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"`
// HTTP client configuration.
// +optional
HTTPConfig *HTTPConfig `json:"http_config,omitempty" yaml:"http_config,omitempty"`
Expand Down
5 changes: 5 additions & 0 deletions api/operator/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions config/crd/overlay/crd.descriptionless.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions config/crd/overlay/crd.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ aliases:

## tip

* FEATURE: [vmalertmanagerconfig](https://docs.victoriametrics.com/operator/resources/vmalertmanagerconfig/): add `post_updates_to_thread` field to `SlackConfig`. This allows alertmanager to post subsequent notifications for an alert group as replies in the thread of the initial Slack message; combined with `update_message`, the initial message is updated in-place and a reply is also posted to its thread. Requires alertmanager with [prometheus/alertmanager#5540](https://github.com/prometheus/alertmanager/pull/5540) (targeting v0.35.0). See [#2580](https://github.com/VictoriaMetrics/operator/pull/2580).

* Dependency: [vmoperator](https://docs.victoriametrics.com/operator/): Updated default versions for VM apps to [v1.151.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.151.0) version
* Dependency: [vmoperator](https://docs.victoriametrics.com/operator/): Updated default versions for VMAnomaly to [v1.30.4](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1304) version
* Dependency: [vmoperator](https://docs.victoriametrics.com/operator/): Updated default versions for VT apps to [v0.11.0](https://github.com/VictoriaMetrics/VictoriaTraces/releases/tag/v0.11.0) version
Expand Down
1 change: 1 addition & 0 deletions docs/api.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -972,6 +972,9 @@ func buildSlack(gc *globalConfig, rc vmv1beta1.SlackConfig, ns string, ac *build
if rc.UpdateMessage != nil {
r.set("update_message", rc.UpdateMessage)
}
if rc.PostUpdatesToThread != nil {
r.set("post_updates_to_thread", rc.PostUpdatesToThread)
}
r.set("mrkdwn_in", rc.MrkdwnIn)
var actions []yaml.MapSlice
for _, action := range rc.Actions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -759,14 +759,15 @@ templates: []
Name: "slack",
},
},
SendResolved: ptr.To(true),
UpdateMessage: ptr.To(true),
Text: "some-text",
Title: "some-title",
LinkNames: false,
ThumbURL: "some-url",
Pretext: "text-1",
Username: "some-user",
SendResolved: ptr.To(true),
UpdateMessage: ptr.To(true),
PostUpdatesToThread: ptr.To(true),
Text: "some-text",
Title: "some-title",
LinkNames: false,
ThumbURL: "some-url",
Pretext: "text-1",
Username: "some-user",
Actions: []vmv1beta1.SlackAction{
{
Name: "deny",
Expand Down Expand Up @@ -827,6 +828,7 @@ receivers:
title: some-title
thumb_url: some-url
update_message: true
post_updates_to_thread: true
actions:
- name: deny
text: text-5
Expand Down