Skip to content

Commit

Permalink
added readiness and liveness probe
Browse files Browse the repository at this point in the history
  • Loading branch information
aizerin committed Jan 16, 2025
1 parent 63c7be5 commit c4b6883
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- None

## Other changes
- [Helm] Add liveness and readiness probe - [#1557](https://github.com/jertel/elastalert2/pull/1557) - @aizerin
- [Docs] Add missing documentation of the `aggregation_alert_time_compared_with_timestamp_field` option. - [#1588](https://github.com/jertel/elastalert2/pull/1588) - @nicolasnovelli
- Fix linter error reporting about return type assignation in `elastalert/test_rule.py`. - [#1594](https://github.com/jertel/elastalert2/pull/1594) - @thican
- Add support for Kibana 8.17 for Kibana Discover - [#1597](https://github.com/jertel/elastalert2/pull/1597) - @nsano-rururu
Expand Down
2 changes: 2 additions & 0 deletions chart/elastalert2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ The command removes all the Kubernetes components associated with the chart and
| `smtp_auth.username` | Optional SMTP mail server username. If the value is not empty, the smtp_auth secret will be created automatically. | `NULL` |
| `smtp_auth.password` | Optional SMTP mail server passwpord. This must be specified if the above field, `smtp_auth.username` is also specified. | `NULL` |
| `metrics.enabled` | Enable elastalert prometheus endpoint, add prometheus.io annotations to pod and create a service pointing to the port for prometheus to scrape the metrics | `false` |
| `livenessProbe` | Liveness probe configuration | `enabled: false` |
| `readinessProbe` | Readiness probe configuration | `enabled: false` |
| `metrics.prometheusPort` | If "metrics" is set to true, prometheus metrics will be exposed by the pod on this port. | `8080` |
| `metrics.prometheusPortName` | Name of the port where metrics are exposed | `http-alt` |
| `metrics.prometheusScrapeAnnotations` | If metrics are enabled, annotations to add to the pod for prometheus configuration. prometheus.io/port is also added during the prometheusPort and prometheusPortName values | `{prometheus.io/scrape: "true" prometheus.io/path: "/"}` |
Expand Down
8 changes: 8 additions & 0 deletions chart/elastalert2/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,14 @@ spec:
{{- end }}
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- if .Values.livenessProbe.enabled }}
livenessProbe:
{{ toYaml .Values.livenessProbe | indent 10 }}
{{- end }}
{{- if .Values.readinessProbe.enabled }}
readinessProbe:
{{ toYaml .Values.readinessProbe | indent 10 }}
{{- end }}
env:
{{- if .Values.elasticsearch.credentialsSecret }}
{{- if .Values.elasticsearch.credentialsSecretUsernameKey }}
Expand Down
6 changes: 6 additions & 0 deletions chart/elastalert2/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,12 @@ rules: {}
# pagerduty_service_key: dummy
# pagerduty_client_name: ElastAlert Deadman Switch

# Probes configuration
livenessProbe:
enabled: false
readinessProbe:
enabled: false

serviceAccount:
# Specifies whether a service account should be created
create: true
Expand Down

0 comments on commit c4b6883

Please sign in to comment.