From fab8e45eeb4bf41e3e9734d6002f853c37ac8f65 Mon Sep 17 00:00:00 2001 From: joceluss <46075025+joceluss@users.noreply.github.com> Date: Tue, 3 Mar 2020 16:24:48 -0500 Subject: [PATCH] Allow configuring terminationGracePeriodSeconds (#21072) Signed-off-by: Jocelyn Lussier --- charts/jenkins/CHANGELOG.md | 5 ++++- charts/jenkins/Chart.yaml | 2 +- charts/jenkins/README.md | 1 + charts/jenkins/templates/jenkins-master-deployment.yaml | 3 +++ charts/jenkins/values.yaml | 3 +++ 5 files changed, 12 insertions(+), 2 deletions(-) diff --git a/charts/jenkins/CHANGELOG.md b/charts/jenkins/CHANGELOG.md index 38030fea7e83..5c3cbb061982 100644 --- a/charts/jenkins/CHANGELOG.md +++ b/charts/jenkins/CHANGELOG.md @@ -5,6 +5,10 @@ numbering uses [semantic versioning](http://semver.org). NOTE: The change log until version 1.5.7 is auto generated based on git commits. Those include a reference to the git commit to be able to get more details. +## 1.9.21 + +Add `master.terminationGracePeriodSeconds` option + ## 1.9.20 Update default plugins @@ -16,7 +20,6 @@ Update default plugins - git:4.2.0 - configuration-as-code:1.36 - ## 1.9.19 Update docs for Helm 3 diff --git a/charts/jenkins/Chart.yaml b/charts/jenkins/Chart.yaml index e5fb7731c92d..d4124a744161 100755 --- a/charts/jenkins/Chart.yaml +++ b/charts/jenkins/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 name: jenkins home: https://jenkins.io/ -version: 1.9.20 +version: 1.9.21 appVersion: lts 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/charts/jenkins/README.md b/charts/jenkins/README.md index 6b1108d3ee52..15c0fd67d758 100644 --- a/charts/jenkins/README.md +++ b/charts/jenkins/README.md @@ -152,6 +152,7 @@ The following tables list the configurable parameters of the Jenkins chart and t | `master.nodeSelector` | Node labels for pod assignment | `{}` | | `master.affinity` | Affinity settings | `{}` | | `master.schedulerName` | Kubernetes scheduler name | Not set | +| `master.terminationGracePeriodSeconds` | Set TerminationGracePeriodSeconds | Not set | | `master.tolerations` | Toleration labels for pod assignment | `[]` | | `master.podAnnotations` | Annotations for master pod | `{}` | | `master.deploymentAnnotations` | Annotations for master deployment | `{}` | diff --git a/charts/jenkins/templates/jenkins-master-deployment.yaml b/charts/jenkins/templates/jenkins-master-deployment.yaml index 74d812174f30..497ef742b377 100644 --- a/charts/jenkins/templates/jenkins-master-deployment.yaml +++ b/charts/jenkins/templates/jenkins-master-deployment.yaml @@ -62,6 +62,9 @@ spec: {{- if .Values.master.affinity }} affinity: {{ toYaml .Values.master.affinity | indent 8 }} + {{- end }} + {{- if quote .Values.master.terminationGracePeriodSeconds }} + terminationGracePeriodSeconds: {{ .Values.master.terminationGracePeriodSeconds }} {{- end }} {{- if and (.Capabilities.APIVersions.Has "scheduling.k8s.io/v1beta1") (.Values.master.priorityClassName) }} priorityClassName: {{ .Values.master.priorityClassName }} diff --git a/charts/jenkins/values.yaml b/charts/jenkins/values.yaml index 54058b56443a..8a9061eea4a8 100644 --- a/charts/jenkins/values.yaml +++ b/charts/jenkins/values.yaml @@ -318,6 +318,9 @@ master: # ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector # ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#taints-and-tolerations-beta-feature nodeSelector: {} + + terminationGracePeriodSeconds: + tolerations: [] # Leverage a priorityClass to ensure your pods survive resource shortages # ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/