jenkinsci / helm-charts

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

Jenkins plugins not getting upgraded through helm chart #1115

Open ssolanki38 opened 1 month ago

ssolanki38 commented 1 month ago

Describe the bug

We have deployed Jenkins in a Kubernetes cluster using the Jenkins helm chart. When we want to upgrade the LTS version of a Jenkins instance, we also want to upgrade the plugins. As part of the helm upgrade, we pass in a plugins.txt file with the list of plugins and plugin versions we would like to upgrade to. We also specify the jenkins LTS version to upgrade to. Then we execute the helm upgrade command.

The problem we're seeing is that sometimes the plugins do not get upgraded while the LTS version does. This does not happen on all the instances we have, only some. It is not clear why the plugins remain at the same version. In the init container, we see the logs of the new plugins getting downloaded and copied to the shared directory /var/jenkins_plugins. Is there a recommended way to upgrade the plugins through the helm chart? It would also be helpful to know if there's something we can do to debug this situation. We are not seeing any helpful logs in the jenkins-master container. Thanks in advance.

Version of Helm and Kubernetes

- Helm: version.BuildInfo{Version:"v3.8.2", GitCommit:"6e3701edea09e5d55a8ca2aae03a68917630e91b", GitTreeState:"clean", GoVersion:"go1.17.5"}
- Kubernetes: Client Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.0", GitCommit:"c2b5237ccd9c0f1d600d3072634ca66cefdf272f", GitTreeState:"clean", BuildDate:"2021-08-04T18:03:20Z", GoVersion:"go1.16.6", Compiler:"gc", Platform:"darwin/arm64"}
Server Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.8", GitCommit:"7061dbbf75f9f82e8ab21f9be7e8ffcaae8e0d44", GitTreeState:"clean", BuildDate:"2022-03-16T14:04:34Z", GoVersion:"go1.16.15", Compiler:"gc", Platform:"linux/amd64"}

Chart version

Our chart is from a few years ago. I'm not sure of the exact version.

What happened?

1. Deploy an instance with LTS version x, and some plugins at specific versions
2. Supply a newer LTS version and plugins.txt with newer versions in the values file. 
3. Run helm upgrade command with this values file.

What you expected to happen?

The newly downloaded jenkins plugins should be loaded into the Jenkins instance, but they remain using the previous versions.

How to reproduce it

No response

Anything else we need to know?

No response

sanketbisne commented 2 weeks ago

Even I am facing the same issue