From 131c783bcddfde38335c929a6cc1ef4ca86739c6 Mon Sep 17 00:00:00 2001 From: Eric Lin <38420555+Ezzahhh@users.noreply.github.com> Date: Fri, 11 Oct 2024 19:45:45 +1000 Subject: [PATCH] feat(helm): configure liveness and readiness probes (#604) * feat(helm): configure liveness and readiness probes Signed-off-by: Eric Lin <38420555+Ezzahhh@users.noreply.github.com> * feat(helm): bump chart version Signed-off-by: Eric Lin <38420555+Ezzahhh@users.noreply.github.com> * fix: typo Signed-off-by: Eric Lin <38420555+Ezzahhh@users.noreply.github.com> * fix: minor bump and gen docs Signed-off-by: Eric Lin <38420555+Ezzahhh@users.noreply.github.com> --------- Signed-off-by: Eric Lin <38420555+Ezzahhh@users.noreply.github.com> --- helm/Chart.yaml | 2 +- helm/README.md | 6 +++++- helm/templates/deployment.yaml | 4 ++++ helm/values.yaml | 8 ++++++++ 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/helm/Chart.yaml b/helm/Chart.yaml index 2f7fb38e..ca3bcf50 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: sql-exporter description: Database-agnostic SQL exporter for Prometheus type: application -version: 0.6.1 +version: 0.7.0 appVersion: 0.15.0 keywords: - exporter diff --git a/helm/README.md b/helm/README.md index 0e1ad22a..789a1640 100644 --- a/helm/README.md +++ b/helm/README.md @@ -1,6 +1,6 @@ # sql-exporter -![Version: 0.6.1](https://img.shields.io/badge/Version-0.6.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.15.0](https://img.shields.io/badge/AppVersion-0.15.0-informational?style=flat-square) +![Version: 0.7.0](https://img.shields.io/badge/Version-0.7.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.15.0](https://img.shields.io/badge/AppVersion-0.15.0-informational?style=flat-square) Database-agnostic SQL exporter for Prometheus @@ -42,6 +42,10 @@ helm install sql_exporter/sql-exporter | extraContainers | object | `{}` | Arbitrary sidecar containers list | | serviceAccount.create | bool | `true` | Specifies whether a Service Account should be created, creates "sql-exporter" service account if true, unless overriden. Otherwise, set to `default` if false, and custom service account name is not provided. Check all the available parameters. | | serviceAccount.annotations | object | `{}` | Annotations to add to the Service Account | +| livenessProbe.initialDelaySeconds | int | `5` | | +| livenessProbe.timeoutSeconds | int | `30` | | +| readinessProbe.initialDelaySeconds | int | `5` | | +| readinessProbe.timeoutSeconds | int | `30` | | | resources | object | `{}` | Resource limits and requests for the application controller pods | | podLabels | object | `{}` | Pod labels | | podAnnotations | object | `{}` | Pod annotations | diff --git a/helm/templates/deployment.yaml b/helm/templates/deployment.yaml index 93b6c742..d469bcd2 100644 --- a/helm/templates/deployment.yaml +++ b/helm/templates/deployment.yaml @@ -96,10 +96,14 @@ spec: {{- end }} {{- end }} livenessProbe: + initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} + timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }} httpGet: path: /healthz port: 9399 readinessProbe: + initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} + timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} httpGet: path: /healthz port: 9399 diff --git a/helm/values.yaml b/helm/values.yaml index ddf1c4a5..afccc250 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -45,6 +45,14 @@ serviceAccount: # iam.gke.io/gcp-service-account: my-service-account@gke.url # -- Defines if token is automatically mounted to the pod after it has been created # automountServiceAccountToken: false +# Liveness and readiness probes for the application controller pods +livenessProbe: + initialDelaySeconds: 5 + timeoutSeconds: 30 + +readinessProbe: + initialDelaySeconds: 5 + timeoutSeconds: 30 # -- Resource limits and requests for the application controller pods resources: {} # limits: