Skip to content

Commit 13e9b6e

Browse files
authored
hotfix (#316)
1 parent 7b10492 commit 13e9b6e

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

api/coralogix/v1alpha1/alert_conversion.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1237,11 +1237,16 @@ func convertStandardConditionsV1alpha1ToLogsThresholdRuleV1beta1(conditions Stan
12371237
threshold = *resource.NewQuantity(int64(*conditions.Threshold), resource.DecimalSI)
12381238
}
12391239

1240+
var timeWindow v1beta1.LogsTimeWindow
1241+
if conditions.TimeWindow != nil {
1242+
timeWindow = v1beta1.LogsTimeWindow{
1243+
SpecificValue: logsTimeWindowV1alpha1ToV1beta1[*conditions.TimeWindow],
1244+
}
1245+
}
1246+
12401247
return v1beta1.LogsThresholdRule{
12411248
Condition: v1beta1.LogsThresholdRuleCondition{
1242-
TimeWindow: v1beta1.LogsTimeWindow{
1243-
SpecificValue: logsTimeWindowV1alpha1ToV1beta1[*conditions.TimeWindow],
1244-
},
1249+
TimeWindow: timeWindow,
12451250
Threshold: threshold,
12461251
LogsThresholdConditionType: logsConditionTypeV1alpha1ToV1beta1[conditions.AlertWhen],
12471252
},

0 commit comments

Comments
 (0)