Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

[stable/jenkins] Allow configuring terminationGracePeriodSeconds #21072

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion stable/jenkins/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -16,7 +20,6 @@ Update default plugins
- git:4.2.0
- configuration-as-code:1.36


## 1.9.19

Update docs for Helm 3
Expand Down
2 changes: 1 addition & 1 deletion stable/jenkins/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions stable/jenkins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 | `{}` |
Expand Down
3 changes: 3 additions & 0 deletions stable/jenkins/templates/jenkins-master-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ spec:
{{- if .Values.master.affinity }}
affinity:
{{ toYaml .Values.master.affinity | indent 8 }}
{{- end }}
{{- if quote .Values.master.terminationGracePeriodSeconds }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you use quote?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add an entry in changeling?

Done

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you use quote?

While testing with value 0, the value was not inserted. It turns out that without the quote the if statement interprets the 0 value as False and it's not inserted.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the explanation.

terminationGracePeriodSeconds: {{ .Values.master.terminationGracePeriodSeconds }}
{{- end }}
{{- if and (.Capabilities.APIVersions.Has "scheduling.k8s.io/v1beta1") (.Values.master.priorityClassName) }}
priorityClassName: {{ .Values.master.priorityClassName }}
Expand Down
3 changes: 3 additions & 0 deletions stable/jenkins/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down