diff --git a/api/v1beta1/grafanaalertrulegroup_types.go b/api/v1beta1/grafanaalertrulegroup_types.go index 1f2dc6475..e8d33c7ef 100644 --- a/api/v1beta1/grafanaalertrulegroup_types.go +++ b/api/v1beta1/grafanaalertrulegroup_types.go @@ -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 @@ -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 diff --git a/config/crd/bases/grafana.integreatly.org_grafanaalertrulegroups.yaml b/config/crd/bases/grafana.integreatly.org_grafanaalertrulegroups.yaml index 9198ec2cc..39d9582c5 100644 --- a/config/crd/bases/grafana.integreatly.org_grafanaalertrulegroups.yaml +++ b/config/crd/bases/grafana.integreatly.org_grafanaalertrulegroups.yaml @@ -101,6 +101,7 @@ spec: - OK - Alerting - Error + - KeepLast type: string for: format: duration @@ -117,6 +118,7 @@ spec: - Alerting - NoData - OK + - KeepLast type: string title: example: Always firing diff --git a/config/grafana.integreatly.org_grafanaalertrulegroups.yaml b/config/grafana.integreatly.org_grafanaalertrulegroups.yaml index 5c441017e..6aabeacda 100644 --- a/config/grafana.integreatly.org_grafanaalertrulegroups.yaml +++ b/config/grafana.integreatly.org_grafanaalertrulegroups.yaml @@ -154,6 +154,7 @@ spec: - OK - Alerting - Error + - KeepLast type: string for: format: duration @@ -170,6 +171,7 @@ spec: - Alerting - NoData - OK + - KeepLast type: string title: example: Always firing diff --git a/deploy/helm/grafana-operator/crds/grafana.integreatly.org_grafanaalertrulegroups.yaml b/deploy/helm/grafana-operator/crds/grafana.integreatly.org_grafanaalertrulegroups.yaml index 9198ec2cc..39d9582c5 100644 --- a/deploy/helm/grafana-operator/crds/grafana.integreatly.org_grafanaalertrulegroups.yaml +++ b/deploy/helm/grafana-operator/crds/grafana.integreatly.org_grafanaalertrulegroups.yaml @@ -101,6 +101,7 @@ spec: - OK - Alerting - Error + - KeepLast type: string for: format: duration @@ -117,6 +118,7 @@ spec: - Alerting - NoData - OK + - KeepLast type: string title: example: Always firing diff --git a/deploy/kustomize/base/crds.yaml b/deploy/kustomize/base/crds.yaml index bd2300a5d..291edd7bd 100644 --- a/deploy/kustomize/base/crds.yaml +++ b/deploy/kustomize/base/crds.yaml @@ -100,6 +100,7 @@ spec: - OK - Alerting - Error + - KeepLast type: string for: format: duration @@ -116,6 +117,7 @@ spec: - Alerting - NoData - OK + - KeepLast type: string title: example: Always firing