diff --git a/CHANGELOG.md b/CHANGELOG.md index 2fbce3e5..9bb2a8b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ## New features - 'summary_table_type' property now supports 'html' format for aggregation tables - [#1260](https://github.com/jertel/elastalert2/pull/1260) - @jertel +- [Helm] Add support for custom deployment annotations - [#1271](https://github.com/jertel/elastalert2/pull/1271) - @victorpugin ## Other changes - [Helm] Expose minReadySeconds parameter to assist in detecting failed deployments - [#1243](https://github.com/jertel/elastalert2/pull/1243) - @alexku7 diff --git a/chart/elastalert2/README.md b/chart/elastalert2/README.md index 04b32071..86b9f7a8 100644 --- a/chart/elastalert2/README.md +++ b/chart/elastalert2/README.md @@ -52,6 +52,7 @@ The command removes all the Kubernetes components associated with the chart and | `image.tag` | docker image tag | 2.13.2 | | `image.pullPolicy` | image pull policy | IfNotPresent | | `image.pullSecret` | image pull secret | "" | +| `deploymentAnnotations` | Annotations to be added to deployment | {} | | `podAnnotations` | Annotations to be added to pods | {} | | `podSecurityContext` | Configurable podSecurityContext for pod execution environment | {"runAsUser": 1000, "runAsGroup": 1000, "fsGroup": 1000} | | `securityContext` | Allows you to set the securityContext for the container | {"runAsNonRoot": true, "runAsUser": 1000} | diff --git a/chart/elastalert2/templates/deployment.yaml b/chart/elastalert2/templates/deployment.yaml index 12640a5f..e04f7c8c 100644 --- a/chart/elastalert2/templates/deployment.yaml +++ b/chart/elastalert2/templates/deployment.yaml @@ -5,11 +5,14 @@ metadata: labels: {{- if .Values.commonLabels }} {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + {{- end }} app: {{ template "elastalert.name" . }} chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" release: {{ .Release.Name }} heritage: {{ .Release.Service }} + {{- if .Values.deploymentAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.deploymentAnnotations "context" $ ) | nindent 4 }} + {{- end }} spec: selector: matchLabels: diff --git a/chart/elastalert2/values.yaml b/chart/elastalert2/values.yaml index f17f91eb..e836c07f 100644 --- a/chart/elastalert2/values.yaml +++ b/chart/elastalert2/values.yaml @@ -55,6 +55,9 @@ image: resources: {} +# Annotations to be added to deployment +deploymentAnnotations: {} + # Annotations to be added to pods podAnnotations: {}