Skip to content

Commit

Permalink
feat: add KeepLast as valid value for no data & exec err state
Browse files Browse the repository at this point in the history
implements #1513
  • Loading branch information
theSuess committed May 10, 2024
1 parent a34f427 commit 0e4412d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/v1beta1/grafanaalertrulegroup_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ type AlertRule struct {
// +kubebuilder:validation:Required
Data []*AlertQuery `json:"data"`

// +kubebuilder:validation:Enum=OK;Alerting;Error
// +kubebuilder:validation:Enum=OK;Alerting;Error;KeepLast
ExecErrState string `json:"execErrState"`

// +kubebuilder:validation:Type=string
Expand All @@ -76,7 +76,7 @@ type AlertRule struct {

Labels map[string]string `json:"labels,omitempty"`

// +kubebuilder:validation:Enum=Alerting;NoData;OK
// +kubebuilder:validation:Enum=Alerting;NoData;OK;KeepLast
NoDataState *string `json:"noDataState"`

// +kubebuilder:validation:MinLength=1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ spec:
- OK
- Alerting
- Error
- KeepLast
type: string
for:
format: duration
Expand All @@ -117,6 +118,7 @@ spec:
- Alerting
- NoData
- OK
- KeepLast
type: string
title:
example: Always firing
Expand Down
2 changes: 2 additions & 0 deletions config/grafana.integreatly.org_grafanaalertrulegroups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ spec:
- OK
- Alerting
- Error
- KeepLast
type: string
for:
format: duration
Expand All @@ -170,6 +171,7 @@ spec:
- Alerting
- NoData
- OK
- KeepLast
type: string
title:
example: Always firing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ spec:
- OK
- Alerting
- Error
- KeepLast
type: string
for:
format: duration
Expand All @@ -117,6 +118,7 @@ spec:
- Alerting
- NoData
- OK
- KeepLast
type: string
title:
example: Always firing
Expand Down
2 changes: 2 additions & 0 deletions deploy/kustomize/base/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ spec:
- OK
- Alerting
- Error
- KeepLast
type: string
for:
format: duration
Expand All @@ -116,6 +117,7 @@ spec:
- Alerting
- NoData
- OK
- KeepLast
type: string
title:
example: Always firing
Expand Down

0 comments on commit 0e4412d

Please sign in to comment.