Skip to content

Commit

Permalink
patch - adding validation for notifyOn (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
OrNovo authored Aug 23, 2023
1 parent d6e8d51 commit a8ce782
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
1 change: 1 addition & 0 deletions apis/coralogix/v1alpha1/alert_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -1392,6 +1392,7 @@ func (in *ShowInInsight) DeepEqual(actualShowInInsight ShowInInsight) (bool, uti
return true, utils.Diff{}
}

// +kubebuilder:validation:Enum=TriggeredOnly;TriggeredAndResolved;
type NotifyOn string

const (
Expand Down
12 changes: 12 additions & 0 deletions config/crd/bases/coralogix.com_alerts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,9 @@ spec:
integrationName:
type: string
notifyOn:
enum:
- TriggeredOnly
- TriggeredAndResolved
type: string
retriggeringPeriodMinutes:
format: int32
Expand Down Expand Up @@ -915,6 +918,9 @@ spec:
properties:
notifyOn:
default: TriggeredOnly
enum:
- TriggeredOnly
- TriggeredAndResolved
type: string
retriggeringPeriodMinutes:
format: int32
Expand Down Expand Up @@ -1761,6 +1767,9 @@ spec:
integrationName:
type: string
notifyOn:
enum:
- TriggeredOnly
- TriggeredAndResolved
type: string
retriggeringPeriodMinutes:
format: int32
Expand Down Expand Up @@ -1809,6 +1818,9 @@ spec:
properties:
notifyOn:
default: TriggeredOnly
enum:
- TriggeredOnly
- TriggeredAndResolved
type: string
retriggeringPeriodMinutes:
format: int32
Expand Down
14 changes: 10 additions & 4 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2218,9 +2218,11 @@ AlertSpec defines the desired state of Alert
<td>false</td>
</tr><tr>
<td><b>notifyOn</b></td>
<td>string</td>
<td>enum</td>
<td>
<br/>
<br/>
<i>Enum</i>: TriggeredOnly, TriggeredAndResolved<br/>
</td>
<td>false</td>
</tr><tr>
Expand Down Expand Up @@ -2304,10 +2306,11 @@ AlertSpec defines the desired state of Alert
</thead>
<tbody><tr>
<td><b>notifyOn</b></td>
<td>string</td>
<td>enum</td>
<td>
<br/>
<br/>
<i>Enum</i>: TriggeredOnly, TriggeredAndResolved<br/>
<i>Default</i>: TriggeredOnly<br/>
</td>
<td>false</td>
Expand Down Expand Up @@ -4477,9 +4480,11 @@ AlertStatus defines the observed state of Alert
<td>false</td>
</tr><tr>
<td><b>notifyOn</b></td>
<td>string</td>
<td>enum</td>
<td>
<br/>
<br/>
<i>Enum</i>: TriggeredOnly, TriggeredAndResolved<br/>
</td>
<td>false</td>
</tr><tr>
Expand Down Expand Up @@ -4563,10 +4568,11 @@ AlertStatus defines the observed state of Alert
</thead>
<tbody><tr>
<td><b>notifyOn</b></td>
<td>string</td>
<td>enum</td>
<td>
<br/>
<br/>
<i>Enum</i>: TriggeredOnly, TriggeredAndResolved<br/>
<i>Default</i>: TriggeredOnly<br/>
</td>
<td>false</td>
Expand Down

0 comments on commit a8ce782

Please sign in to comment.