Skip to content

Commit

Permalink
Don't create plugins volume when not needed (#675)
Browse files Browse the repository at this point in the history
  • Loading branch information
Janosch Schäfer committed Aug 3, 2022
1 parent 01eea64 commit f6a406e
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1 deletion.
4 changes: 4 additions & 0 deletions charts/jenkins/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ Use the following links to reference issues, PRs, and commits prior to v2.6.0.
The change log until v1.5.7 was auto-generated based on git commits.
Those entries include a reference to the git commit to be able to get more details.

## 4.1.14

If `installPlugins` is disabled, don't create unused plugins volume.

## 4.1.13

Update Jenkins image and appVersion to jenkins lts release version 2.346.2
Expand Down
2 changes: 1 addition & 1 deletion charts/jenkins/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: jenkins
home: https://jenkins.io/
version: 4.1.13
version: 4.1.14
appVersion: 2.346.2
description: Jenkins - Build great things at any scale! The leading open source automation server, Jenkins provides hundreds of plugins to support building, deploying and automating any project.
sources:
Expand Down
4 changes: 4 additions & 0 deletions charts/jenkins/templates/jenkins-controller-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,12 @@ spec:
{{- if .Values.persistence.volumes }}
{{ tpl (toYaml .Values.persistence.volumes | indent 6) . }}
{{- end }}
{{- if .Values.controller.installPlugins }}
{{- if .Values.controller.overwritePluginsFromImage }}
- name: plugins
emptyDir: {}
{{- end }}
{{- end }}
{{- if and .Values.controller.initScripts .Values.controller.initConfigMap }}
- name: init-scripts
projected:
Expand Down
15 changes: 15 additions & 0 deletions charts/jenkins/unittests/jenkins-controller-statefulset-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -575,3 +575,18 @@ tests:
asserts:
- matchSnapshot:
path: spec.template.metadata.annotations
- it:
template: jenkins-controller-statefulset.yaml
set:
controller:
installPlugins: false
asserts:
- notContains:
path: spec.template.spec.volumes
content:
name: plugins
emptyDir: {}
- notContains:
path: spec.template.spec.initContainers[0].volumeMounts
content:
name: plugins

0 comments on commit f6a406e

Please sign in to comment.