Skip to content

Commit

Permalink
fix: controller.sidecars.additionalSidecarContainers renaming and add…
Browse files Browse the repository at this point in the history
… tests (jenkinsci#1002)

Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
  • Loading branch information
jonesbusy and timja authored Feb 6, 2024
1 parent 270aaad commit 56323ad
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 4 deletions.
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 changelog 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.

## 5.0.12

Fix controller.sidecars.additionalSidecarContainers renaming and add tests

## 5.0.11

* Add controller.sidecars.configAutoReload.scheme to specify protocol scheme when connecting Jenkins configuration-as-code reload endpoint
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: 5.0.11
version: 5.0.12
appVersion: 2.426.3
description: Jenkins - Build great things at any scale! The leading open source automation server, Jenkins provides over 1800 plugins to support building, deploying and automating any project.
sources:
Expand Down
2 changes: 1 addition & 1 deletion charts/jenkins/VALUES_SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ The following tables list the configurable parameters of the Jenkins chart and t
| `controller.admin.userKey` | The key in the existing admin secret containing the username. | `jenkins-admin-user` |
| `controller.admin.passwordKey` | The key in the existing admin secret containing the password. | `jenkins-admin-password` |
| `controller.customInitContainers` | Custom init-container specification in raw-yaml format | Not set |
| `controller.sidecars.other` | Configures additional sidecar container(s) for Jenkins controller | `[]` |
| `controller.sidecars.additionalSidecarContainers`| Configures additional sidecar container(s) for Jenkins controller | `[]` |

#### Kubernetes Pod Disruption Budget

Expand Down
4 changes: 2 additions & 2 deletions charts/jenkins/templates/jenkins-controller-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,8 @@ spec:
{{- end}}


{{- if .Values.controller.sidecars.other}}
{{ tpl (toYaml .Values.controller.sidecars.other | indent 8) .}}
{{- if .Values.controller.sidecars.additionalSidecarContainers}}
{{ tpl (toYaml .Values.controller.sidecars.additionalSidecarContainers | indent 8) .}}
{{- end }}

volumes:
Expand Down
30 changes: 30 additions & 0 deletions charts/jenkins/unittests/jenkins-controller-statefulset-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,36 @@ tests:
runAsUser: 4444
supplementalGroups:
- 5555
- it: test controller.sidecars.additionalSidecarContainers
template: jenkins-controller-statefulset.yaml
set:
controller:
sidecars:
additionalSidecarContainers:
- name: otel-collector
image: opentelemetry-collector:0.93.0
imagePullPolicy: IfNotPresent
resources:
limits:
cpu: 200m
memory: 256Mi
requests:
cpu: 100m
memory: 128Mi
asserts:
- equal:
path: spec.template.spec.containers[2]
value:
name: otel-collector
image: opentelemetry-collector:0.93.0
imagePullPolicy: IfNotPresent
resources:
limits:
cpu: 200m
memory: 256Mi
requests:
cpu: 100m
memory: 128Mi
- it: test 2 additional secrets
template: jenkins-controller-statefulset.yaml
set:
Expand Down

0 comments on commit 56323ad

Please sign in to comment.