helm-charts
helm-charts copied to clipboard
Add UserContent mechanism
What this PR does / why we need it
Implements a way to provide User Content files that will be served by Jenkins. Common use-case is to let Jenkins host a svg
or png
together with a custom css
to customize the UI.
Which issue this PR fixes
Special notes for your reviewer
Checklist
- [x] DCO signed
- [x] Chart Version bumped
- [x] CHANGELOG.md was updated
The use-case I'd like to solve is to let Jenkins host a simple svg
or png
together with a custom css
to adapt the styling of the UI - and that seems to be a quiet common use-case:
- https://medium.com/@elhayefrat/replace-jenkins-logo-and-text-to-your-choice-in-jenkinsui-f7d35daed25b
- https://nadavsvirsky.medium.com/customize-jenkins-favicon-dashboard-logo-f5c0b70d817d
- https://stackoverflow.com/a/70360371
To achieve this with the current implementation:
- Use the
persistence.volumes
&persistence.mounts
option- Would require an external ConfigMap / Secret / PVC to be created outside the Helm context
- Create a custom Docker image where the content gets baked in
- Would require to build & host the docker image: Additional CI & Hosting infrastructure
- Download the resources from an external source
- Requires to host the content via a webserver infrastructure
- Write a plugin to host the content
- Total overkill
All of these come with more or less overhead. Therefore, letting Jenkins host the files itself would be the most elegant one. Not sure if there is a more easy way to achieve this - any hint would be great.
Hey @torstenwalter, I refactored to work with ConfigMaps instead of Secrets. Also it's possible to provide UTF-8 or binary encoded content separately. What's your suggestion?
@timmjd Sorry I lost track of this. You can ping me once the merge conflicts are resolved and a test is added otherwise this looks good to me.