From 986d09f3aa5abeff1480dc7b3959ab6ee493d000 Mon Sep 17 00:00:00 2001 From: Julio H Morimoto Date: Thu, 24 Feb 2022 02:15:59 -0300 Subject: [PATCH] Adds a startupProbe and additional parameters to values.yaml to allow customization of startupProbe, livenessProbe, readinessProbe. (#106) Signed-off-by: Julio Morimoto --- charts/graylog/Chart.yaml | 2 +- charts/graylog/templates/statefulset.yaml | 31 +++++++++++++++-------- charts/graylog/values.yaml | 20 +++++++++++++++ 3 files changed, 42 insertions(+), 11 deletions(-) diff --git a/charts/graylog/Chart.yaml b/charts/graylog/Chart.yaml index 4f4cca6..83e57c7 100755 --- a/charts/graylog/Chart.yaml +++ b/charts/graylog/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: graylog home: https://www.graylog.org -version: 2.0.0 +version: 2.1.0 appVersion: 4.2.3 description: Graylog is the centralized log management solution built to open standards for capturing, storing, and enabling real-time analysis of terabytes of machine data. keywords: diff --git a/charts/graylog/templates/statefulset.yaml b/charts/graylog/templates/statefulset.yaml index 99ba171..374dce5 100644 --- a/charts/graylog/templates/statefulset.yaml +++ b/charts/graylog/templates/statefulset.yaml @@ -169,6 +169,17 @@ spec: {{- end }} resources: {{ toYaml .Values.graylog.resources | indent 12 }} + startupProbe: + httpGet: + path: /api/system/lbstatus + port: 9000 + {{- if .Values.graylog.tls.enabled }} + scheme: HTTPS + {{- end }} + periodSeconds: {{ .Values.graylog.startupProbe.periodSeconds }} + failureThreshold: {{ .Values.graylog.startupProbe.failureThreshold }} + successThreshold: {{ .Values.graylog.startupProbe.successThreshold }} + timeoutSeconds: {{ .Values.graylog.startupProbe.timeoutSeconds }} livenessProbe: httpGet: path: /api/system/lbstatus @@ -176,11 +187,11 @@ spec: {{- if .Values.graylog.tls.enabled }} scheme: HTTPS {{- end }} - initialDelaySeconds: 120 - periodSeconds: 30 - failureThreshold: 3 - successThreshold: 1 - timeoutSeconds: 5 + initialDelaySeconds: {{ .Values.graylog.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.graylog.livenessProbe.periodSeconds }} + failureThreshold: {{ .Values.graylog.livenessProbe.failureThreshold }} + successThreshold: {{ .Values.graylog.livenessProbe.successThreshold }} + timeoutSeconds: {{ .Values.graylog.livenessProbe.timeoutSeconds }} readinessProbe: httpGet: path: /api/system/lbstatus @@ -188,11 +199,11 @@ spec: {{- if .Values.graylog.tls.enabled }} scheme: HTTPS {{- end }} - initialDelaySeconds: 60 - periodSeconds: 10 - failureThreshold: 3 - successThreshold: 1 - timeoutSeconds: 5 + initialDelaySeconds: {{ .Values.graylog.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.graylog.readinessProbe.periodSeconds }} + failureThreshold: {{ .Values.graylog.readinessProbe.failureThreshold }} + successThreshold: {{ .Values.graylog.readinessProbe.successThreshold }} + timeoutSeconds: {{ .Values.graylog.readinessProbe.timeoutSeconds }} volumeMounts: - name: journal mountPath: /usr/share/graylog/data/journal diff --git a/charts/graylog/values.yaml b/charts/graylog/values.yaml index 7ff3f5d..66c499e 100644 --- a/charts/graylog/values.yaml +++ b/charts/graylog/values.yaml @@ -213,6 +213,26 @@ graylog: ## type: ClusterIP + startupProbe: + periodSeconds: 60 + failureThreshold: 3 + successThreshold: 1 + timeoutSeconds: 5 + + livenessProbe: + initialDelaySeconds: 0 + periodSeconds: 30 + failureThreshold: 3 + successThreshold: 1 + timeoutSeconds: 5 + + readinessProbe: + initialDelaySeconds: 0 + periodSeconds: 10 + failureThreshold: 3 + successThreshold: 1 + timeoutSeconds: 5 + ## Additional input ports for receiving logs from servers ## Note: Name must be in IANA_SVC_NAME (at most 15 characters, matching regex [a-z0-9]([a-z0-9-]*[a-z0-9])* and it must contains at least one letter [a-z], hyphens cannot be adjacent to other hyphens) ## Note: Array must be sorted by port order