From 2cd3fc481cbc8ce753a7779cc2439f5b83141966 Mon Sep 17 00:00:00 2001 From: Carlos Sanchez Date: Fri, 20 Apr 2018 20:56:59 +0200 Subject: [PATCH] [stable/jenkins] Wait for up to 2 minutes before failing liveness check (#5161) * [stable/jenkins] Wait for up to 2 minutes before failing liveness check Otherwise a plugin installation causes 2 restarts * Update Chart.yaml --- stable/jenkins/Chart.yaml | 2 +- stable/jenkins/README.md | 1 + stable/jenkins/templates/jenkins-master-deployment.yaml | 2 ++ stable/jenkins/values.yaml | 2 ++ 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/stable/jenkins/Chart.yaml b/stable/jenkins/Chart.yaml index 7413e241c7..411a4c7b97 100755 --- a/stable/jenkins/Chart.yaml +++ b/stable/jenkins/Chart.yaml @@ -1,6 +1,6 @@ name: jenkins home: https://jenkins.io/ -version: 0.14.5 +version: 0.14.6 appVersion: 2.107 description: Open source continuous integration server. It supports multiple SCM tools including CVS, Subversion and Git. It can execute Apache Ant and Apache Maven-based diff --git a/stable/jenkins/README.md b/stable/jenkins/README.md index 92670f8f9a..de93fdca29 100644 --- a/stable/jenkins/README.md +++ b/stable/jenkins/README.md @@ -50,6 +50,7 @@ The following tables list the configurable parameters of the Jenkins chart and t | `Master.NodePort` | k8s node port | Not set | | `Master.HealthProbes` | Enable k8s liveness and readiness probes | `true` | | `Master.HealthProbesTimeout` | Set the timeout for the liveness and readiness probes | `120` | +| `Master.HealthProbeLivenessFailureThreshold` | Set the failure threshold for the liveness probe | `12` | | `Master.ContainerPort` | Master listening port | `8080` | | `Master.SlaveListenerPort` | Listening port for agents | `50000` | | `Master.LoadBalancerSourceRanges` | Allowed inbound IP addresses | `0.0.0.0/0` | diff --git a/stable/jenkins/templates/jenkins-master-deployment.yaml b/stable/jenkins/templates/jenkins-master-deployment.yaml index 6a0154a7f1..79f32e5b54 100644 --- a/stable/jenkins/templates/jenkins-master-deployment.yaml +++ b/stable/jenkins/templates/jenkins-master-deployment.yaml @@ -127,6 +127,8 @@ spec: path: /login port: http initialDelaySeconds: {{ .Values.Master.HealthProbesTimeout }} + timeoutSeconds: 5 + failureThreshold: {{ .Values.Master.HealthProbeLivenessFailureThreshold }} readinessProbe: httpGet: path: /login diff --git a/stable/jenkins/values.yaml b/stable/jenkins/values.yaml index 2648b334a3..8aea85dd59 100644 --- a/stable/jenkins/values.yaml +++ b/stable/jenkins/values.yaml @@ -49,6 +49,8 @@ Master: # Enable Kubernetes Liveness and Readiness Probes HealthProbes: true HealthProbesTimeout: 60 + # ~2 minutes to allow Jenkins to restart when upgrading plugins + HealthProbeLivenessFailureThreshold: 12 SlaveListenerPort: 50000 # Kubernetes service type for the JNLP slave service # SETTING THIS TO "LoadBalancer" IS A HUGE SECURITY RISK: https://github.com/kubernetes/charts/issues/1341