jenkinsci / helm-charts

Jenkins helm charts
https://artifacthub.io/packages/helm/jenkinsci/jenkins
Apache License 2.0
561 stars 882 forks source link

overwritePluginsFromImage works not as expected #1153

Open bmaehr opened 2 months ago

bmaehr commented 2 months ago

Describe the bug

When setting overwritePluginsFromImage=false I would expect that the plugins from image stay in their version but plugins from installPlugins or additionalPlugins are added. But that fails, because the "/usr/share/jenkins/ref/plugins" is Read-only file system.

In fact I just try to get a setup where a list of base plugins are downloaded while the docker build phase and then some additional plugins could be added through the chart. But I was not able to get this - IMHO not very special - use case to work

Version of Helm and Kubernetes

- Helm: 3.10.2
- Kubernetes: v1.29.6-gke.1254000

Chart version

4.12.1

What happened?

1. Add plugins to custom image by jenkins-plugin-cli
2. Use custom image in chart
3. Add additional plugins to installPlugins
4. Container is not starting up

What you expected to happen?

Have the plugins form the base image and from installPlugins or additionalPlugins

How to reproduce it

No response

Anything else we need to know?

No response

jesrig commented 1 month ago

@bmaehr Would you mind updating the exact steps to reproduce on the How to Reproduce It section? I want to be totally clear about this issue

bmaehr commented 1 month ago

I would ask the other way round: Have you tried to add plugins to the image and add further plugins by the chart? If it is possible in some way, that would be an option for me.

What I have done: In the Dockerfile added

RUN jenkins-plugin-cli --plugins \
    ant:latest \
    antisamy-markup-formatter:latest \
    ansicolor:latest \
    ...

and added

additionalPlugins:
    - kubernetes:1.27.6
    - workflow-aggregator:2.6
    - git:4.4.5
    - configuration-as-code:1.46
    - Docker:1.2.1

to the values of the chart.

jesrig commented 1 month ago

@bmaehr I can't recreate your issue. Here are the steps I took:

  1. Created an Dockerfile and pushed the resulting image up to my repository
FROM jenkins/jenkins:lts

RUN jenkins-plugin-cli --plugins \
    ant:latest \
    antisamy-markup-formatter:latest \
    ansicolor:latest \
  1. Set this image as the contoller image
  2. Left default installPlugins intact
  3. Updated additionalPlugins
    additionalPlugins:
    - ansible:307.va_1f3ef06575a_
  4. Ran tilt up in the chart repo.

Result: I see all the plugins in the /var/jenkins_home/plugins folder as expected.

jesrig commented 1 month ago

@bmaehr If this issue is resolved, can you close it?

Thanks