diff --git a/mariadb/Chart.yaml b/mariadb/Chart.yaml index bf067835e..7997f025e 100644 --- a/mariadb/Chart.yaml +++ b/mariadb/Chart.yaml @@ -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: diff --git a/mariadb/templates/statefulset.yaml b/mariadb/templates/statefulset.yaml index 41fa50f68..889ff71e3 100644 --- a/mariadb/templates/statefulset.yaml +++ b/mariadb/templates/statefulset.yaml @@ -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: diff --git a/mariadb/values.yaml b/mariadb/values.yaml index b74c57b8a..1a2f8d77d 100644 --- a/mariadb/values.yaml +++ b/mariadb/values.yaml @@ -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: diff --git a/releasenotes/notes/mariadb.yaml b/releasenotes/notes/mariadb.yaml index 94fc9ca4f..835c4ba0f 100644 --- a/releasenotes/notes/mariadb.yaml +++ b/releasenotes/notes/mariadb.yaml @@ -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 ...