From 18768289bf573ae04e6abe0c9e10744da3d88f65 Mon Sep 17 00:00:00 2001 From: Emilien Devos <121870973+edevosc2c@users.noreply.github.com> Date: Tue, 9 Jul 2024 10:43:38 +0200 Subject: [PATCH] allow customization of liveness and startup probe for mapstore --- templates/geoserver/geoserver-deployment.yaml | 10 ++++++++-- templates/mapstore/mapstore-deployment.yaml | 10 ++++++++++ values.yaml | 2 ++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/templates/geoserver/geoserver-deployment.yaml b/templates/geoserver/geoserver-deployment.yaml index 06a5a05..0918890 100644 --- a/templates/geoserver/geoserver-deployment.yaml +++ b/templates/geoserver/geoserver-deployment.yaml @@ -195,8 +195,9 @@ spec: ports: - containerPort: 8080 name: http-proxy - {{- if $webapp.custom_liveness_probe }} - {{ $webapp.custom_liveness_probe | toYaml | nindent 8 }} + {{- if $webapp.livenessProbe }} + livenessProbe: + {{ $webapp.livenessProbe | toYaml | nindent 10 }} {{- else }} livenessProbe: httpGet: @@ -205,11 +206,16 @@ spec: periodSeconds: 10 timeoutSeconds: 5 {{- end }} + {{- if $webapp.startupProbe }} + startupProbe: + {{ $webapp.startupProbe | toYaml | nindent 10 }} + {{- else }} startupProbe: tcpSocket: port: 8080 failureThreshold: 5 periodSeconds: 40 + {{- else }} {{- if $webapp.jetty_monitoring }} - name: jmx-collectd image: camptocamp/jmx-collectd:bullseye diff --git a/templates/mapstore/mapstore-deployment.yaml b/templates/mapstore/mapstore-deployment.yaml index 153db29..e82c60e 100644 --- a/templates/mapstore/mapstore-deployment.yaml +++ b/templates/mapstore/mapstore-deployment.yaml @@ -63,17 +63,27 @@ spec: lifecycle: {{- toYaml . | nindent 10 }} {{- end }} + {{- if $webapp.livenessProbe }} + livenessProbe: + {{ $webapp.livenessProbe | toYaml | nindent 10 }} + {{- else }} livenessProbe: httpGet: path: /mapstore/configs/config.json port: 8080 periodSeconds: 10 + {{- end }} + {{- if $webapp.startupProbe }} + startupProbe: + {{ $webapp.startupProbe | toYaml | nindent 10 }} + {{- else }} startupProbe: httpGet: path: /mapstore/configs/config.json port: 8080 failureThreshold: 5 periodSeconds: 15 + {{- end }} volumes: - name: georchestra-datadir emptyDir: {} diff --git a/values.yaml b/values.yaml index 1be57c0..f1b9738 100644 --- a/values.yaml +++ b/values.yaml @@ -119,6 +119,8 @@ georchestra: geoserver: enabled: true replicaCount: "1" + livenessProbe: [] + startupProbe: [] docker_image: georchestra/geoserver:latest jetty_monitoring: false extra_environment: []