Merge "[mariadb] Add probes for exporter"

This commit is contained in:
Zuul 2024-11-22 10:20:46 +00:00 committed by Gerrit Code Review
commit a2910463ac
4 changed files with 22 additions and 1 deletions

View File

@ -15,7 +15,7 @@ apiVersion: v1
appVersion: v10.6.7
description: OpenStack-Helm MariaDB
name: mariadb
version: 0.2.65
version: 0.2.66
home: https://mariadb.com/kb/en/
icon: http://badges.mariadb.org/mariadb-badge-180x60.png
sources:

View File

@ -28,6 +28,11 @@ exec:
- -t
- liveness
{{- end }}
{{- define "exporterProbeTemplate" }}
httpGet:
path: /metrics
port: {{ tuple "prometheus_mysql_exporter" "internal" "metrics" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
{{- end }}
{{- if (.Values.global).subchart_release_name }}
{{- $_ := set . "deployment_name" .Chart.Name }}
@ -266,6 +271,8 @@ spec:
{{ tuple $envAll "prometheus_mysql_exporter" | include "helm-toolkit.snippets.image" | indent 10 }}
{{ dict "envAll" $envAll "application" "server" "container" "exporter" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
{{ tuple $envAll $envAll.Values.pod.resources.prometheus_mysql_exporter | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
{{ dict "envAll" . "component" "server" "container" "mariadb_exporter" "type" "readiness" "probeTemplate" (include "exporterProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
{{ dict "envAll" . "component" "server" "container" "mariadb_exporter" "type" "liveness" "probeTemplate" (include "exporterProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
command:
- /tmp/mysqld-exporter.sh
ports:

View File

@ -76,6 +76,19 @@ pod:
initialDelaySeconds: 120
periodSeconds: 30
timeoutSeconds: 15
mariadb_exporter:
readiness:
enabled: true
params:
initialDelaySeconds: 5
periodSeconds: 60
timeoutSeconds: 10
liveness:
enabled: true
params:
initialDelaySeconds: 15
periodSeconds: 60
timeoutSeconds: 10
security_context:
server:
pod:

View File

@ -81,4 +81,5 @@ mariadb:
- 0.2.63 Use service ip for endpoint discovery
- 0.2.64 Add terminationGracePeriodSeconds
- 0.2.65 Allow to use default storage class
- 0.2.66 Add probes for exporter
...