Skip to content

Commit db8c96b

Browse files
committed
Deprecate alerts destinations
1 parent dffcc0c commit db8c96b

File tree

6 files changed

+18
-86
lines changed

6 files changed

+18
-86
lines changed

api/coralogix/v1beta1/alert_types.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,8 @@ type NotificationGroup struct {
382382
// +optional
383383
Webhooks []WebhookSettings `json:"webhooks"`
384384

385-
// The destinations for notifications (Notification Center feature).
385+
// Do not use.
386+
// Deprecated: This field is deprecated and will be removed in a future version.
386387
// +optional
387388
Destinations []NotificationDestination `json:"destinations,omitempty"`
388389

charts/coralogix-operator/templates/crds/coralogix.com_alerts.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1809,8 +1809,9 @@ spec:
18091809
description: Where notifications should be sent to.
18101810
properties:
18111811
destinations:
1812-
description: The destinations for notifications (Notification
1813-
Center feature).
1812+
description: |-
1813+
Do not use.
1814+
Deprecated: This field is deprecated and will be removed in a future version.
18141815
items:
18151816
properties:
18161817
connector:
@@ -2092,8 +2093,9 @@ spec:
20922093
description: Notification group to use for alert notifications.
20932094
properties:
20942095
destinations:
2095-
description: The destinations for notifications (Notification
2096-
Center feature).
2096+
description: |-
2097+
Do not use.
2098+
Deprecated: This field is deprecated and will be removed in a future version.
20972099
items:
20982100
properties:
20992101
connector:

config/crd/bases/coralogix.com_alerts.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1809,8 +1809,9 @@ spec:
18091809
description: Where notifications should be sent to.
18101810
properties:
18111811
destinations:
1812-
description: The destinations for notifications (Notification
1813-
Center feature).
1812+
description: |-
1813+
Do not use.
1814+
Deprecated: This field is deprecated and will be removed in a future version.
18141815
items:
18151816
properties:
18161817
connector:
@@ -2092,8 +2093,9 @@ spec:
20922093
description: Notification group to use for alert notifications.
20932094
properties:
20942095
destinations:
2095-
description: The destinations for notifications (Notification
2096-
Center feature).
2096+
description: |-
2097+
Do not use.
2098+
Deprecated: This field is deprecated and will be removed in a future version.
20972099
items:
20982100
properties:
20992101
connector:

config/samples/v1beta1/alerts/metric_threshold.yaml

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -39,29 +39,3 @@ spec:
3939
integrationRef:
4040
resourceRef:
4141
name: slack-webhook
42-
destinations:
43-
- connector:
44-
resourceRef:
45-
name: slack-sample
46-
preset:
47-
backendRef:
48-
id: preset_system_slack_alerts_basic
49-
notifyOn: triggeredAndResolved
50-
triggeredRoutingOverrides:
51-
configOverrides:
52-
payloadType: "slack_structured"
53-
connectorConfigFields:
54-
- fieldName: channel
55-
template: "{{alertDef.priority}}"
56-
messageConfigFields:
57-
- fieldName: title
58-
template: "TRIGGERED PRESET OVERRIDE: {{alert.status}} {{alertDef.priority}} - {{alertDef.name}}"
59-
resolvedRoutingOverrides:
60-
configOverrides:
61-
payloadType: "slack_structured"
62-
connectorConfigFields:
63-
- fieldName: channel
64-
template: "{{alertDef.priority}}"
65-
messageConfigFields:
66-
- fieldName: title
67-
template: "RESOLVED PRESET OVERRIDE: {{alert.status}} {{alertDef.priority}} - {{alertDef.name}}"

docs/api.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4478,7 +4478,8 @@ Where notifications should be sent to.
44784478
<td><b><a href="#alertspecnotificationgroupdestinationsindex">destinations</a></b></td>
44794479
<td>[]object</td>
44804480
<td>
4481-
The destinations for notifications (Notification Center feature).<br/>
4481+
Do not use.
4482+
Deprecated: This field is deprecated and will be removed in a future version.<br/>
44824483
</td>
44834484
<td>false</td>
44844485
</tr><tr>
@@ -5297,7 +5298,8 @@ Notification group to use for alert notifications.
52975298
<td><b><a href="#alertspecnotificationgroupexcessindexdestinationsindex">destinations</a></b></td>
52985299
<td>[]object</td>
52995300
<td>
5300-
The destinations for notifications (Notification Center feature).<br/>
5301+
Do not use.
5302+
Deprecated: This field is deprecated and will be removed in a future version.<br/>
53015303
</td>
53025304
<td>false</td>
53035305
</tr><tr>

tests/e2e/alert_test.go

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -87,55 +87,6 @@ var _ = Describe("Alert", Ordered, func() {
8787
},
8888
},
8989
},
90-
Destinations: []coralogixv1beta1.NotificationDestination{
91-
{
92-
Connector: coralogixv1beta1.NCRef{
93-
ResourceRef: &coralogixv1beta1.ResourceRef{
94-
Name: connectorName,
95-
},
96-
},
97-
Preset: &coralogixv1beta1.NCRef{
98-
ResourceRef: &coralogixv1beta1.ResourceRef{
99-
Name: presetName,
100-
},
101-
},
102-
NotifyOn: coralogixv1beta1.NotifyOnTriggeredAndResolved,
103-
TriggeredRoutingOverrides: coralogixv1beta1.NotificationRouting{
104-
ConfigOverrides: &coralogixv1beta1.SourceOverrides{
105-
PayloadType: "slack_structured",
106-
ConnectorConfigFields: []coralogixv1beta1.ConfigField{
107-
{
108-
FieldName: "channel",
109-
Template: "{{alertDef.priority}}",
110-
},
111-
},
112-
MessageConfigFields: []coralogixv1beta1.ConfigField{
113-
{
114-
FieldName: "title",
115-
Template: "TRIGGERED PRESET OVERRIDE: {{alert.status}} {{alertDef.priority}} - {{alertDef.name}}",
116-
},
117-
},
118-
},
119-
},
120-
ResolvedRoutingOverrides: &coralogixv1beta1.NotificationRouting{
121-
ConfigOverrides: &coralogixv1beta1.SourceOverrides{
122-
PayloadType: "slack_structured",
123-
ConnectorConfigFields: []coralogixv1beta1.ConfigField{
124-
{
125-
FieldName: "channel",
126-
Template: "{{alertDef.priority}}",
127-
},
128-
},
129-
MessageConfigFields: []coralogixv1beta1.ConfigField{
130-
{
131-
FieldName: "title",
132-
Template: "RESOLVED PRESET OVERRIDE: {{alert.status}} {{alertDef.priority}} - {{alertDef.name}}",
133-
},
134-
},
135-
},
136-
},
137-
},
138-
},
13990
},
14091

14192
Schedule: &coralogixv1beta1.AlertSchedule{

0 commit comments

Comments
 (0)