From 73db2e0fc9604f0c6c02920518fcea6e29faa6ae Mon Sep 17 00:00:00 2001 From: Mitsufumi KIkyotani <32785388+mk811@users.noreply.github.com> Date: Sun, 24 Jan 2021 00:00:27 +1100 Subject: [PATCH] Make livenessProbe and readinessProbe configurable in Helm chart (#499) --- chart/jenkins-operator/templates/jenkins.yaml | 26 +++-------- chart/jenkins-operator/values.yaml | 23 ++++++++++ .../content/en/docs/Installation/_index.md | 44 +++++++++++++++++++ 3 files changed, 73 insertions(+), 20 deletions(-) diff --git a/chart/jenkins-operator/templates/jenkins.yaml b/chart/jenkins-operator/templates/jenkins.yaml index 23abc497..023dd97a 100644 --- a/chart/jenkins-operator/templates/jenkins.yaml +++ b/chart/jenkins-operator/templates/jenkins.yaml @@ -86,26 +86,12 @@ spec: {{- with .Values.jenkins.imagePullSecrets }} imagePullSecrets: {{ toYaml . | nindent 10 }} {{- end }} - livenessProbe: - failureThreshold: 12 - httpGet: - path: /login - port: http - scheme: HTTP - initialDelaySeconds: 80 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 5 - readinessProbe: - failureThreshold: 3 - httpGet: - path: /login - port: http - scheme: HTTP - initialDelaySeconds: 30 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 1 + {{- with .Values.jenkins.livenessProbe }} + livenessProbe: {{ toYaml . | nindent 10 }} + {{- end }} + {{- with .Values.jenkins.readinessProbe }} + readinessProbe: {{ toYaml . | nindent 10 }} + {{- end }} {{- with .Values.jenkins.resources }} resources: {{ toYaml . | nindent 10 }} {{- end }} diff --git a/chart/jenkins-operator/values.yaml b/chart/jenkins-operator/values.yaml index be0e2be7..87494b8a 100644 --- a/chart/jenkins-operator/values.yaml +++ b/chart/jenkins-operator/values.yaml @@ -147,6 +147,29 @@ jenkins: # slave Jenkins service # See https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/schema/#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Service for details #slaveService: + + # LivenessProbe for Jenkins Master pod + livenessProbe: + failureThreshold: 12 + httpGet: + path: /login + port: http + scheme: HTTP + initialDelaySeconds: 80 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 + # ReadinessProbe for Jenkins Master pod + readinessProbe: + failureThreshold: 3 + httpGet: + path: /login + port: http + scheme: HTTP + initialDelaySeconds: 30 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 # backup is section for configuring operator's backup feature # By default backup feature is enabled and pre-configured diff --git a/website/content/en/docs/Installation/_index.md b/website/content/en/docs/Installation/_index.md index 2db8b7e2..91abb30a 100644 --- a/website/content/en/docs/Installation/_index.md +++ b/website/content/en/docs/Installation/_index.md @@ -385,6 +385,50 @@ SecurityContext for pod.
livenessProbe
++livenessProbe: + failureThreshold: 12 + httpGet: + path: /login + port: http + scheme: HTTP + initialDelaySeconds: 80 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 ++
readinessProbe
++readinessProbe: + failureThreshold: 3 + httpGet: + path: /login + port: http + scheme: HTTP + initialDelaySeconds: 30 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 ++
backup