blob: 8175d7dcb333ce28717dfb771a0015b748cbad84 [file] [log] [blame] [view]
Giorgi Lekveishvili35982662024-04-05 13:05:40 +04001# Upgrade Notes
2
3## To 5.0.0
gio20157e82026-07-22 13:10:48 +04004
Giorgi Lekveishvili35982662024-04-05 13:05:40 +04005- `controller.image`, `controller.tag`, and `controller.tagLabel` have been removed. If you want to overwrite the image you now need to configure any or all of:
6 - `controller.image.registry`
7 - `controller.image.repository`
8 - `controller.image.tag`
9 - `controller.image.tagLabel`
10- `controller.imagePullPolicy` has been removed. If you want to overwrite the pull policy you now need to configure `controller.image.pullPolicy`.
11- `controller.sidecars.configAutoReload.image` has been removed. If you want to overwrite the configAutoReload image you now need to configure any or all of:
12 - `controller.sidecars.configAutoReload.image.registry`
13 - `controller.sidecars.configAutoReload.image.repository`
14 - `controller.sidecars.configAutoReload.image.tag`
15- `controller.sidecars.other` has been renamed to `controller.sidecars.additionalSidecarContainers`.
16- `agent.image` and `agent.tag` have been removed. If you want to overwrite the agent image you now need to configure any or all of:
17 - `agent.image.repository`
18 - `agent.image.tag`
19 - The registry can still be overwritten by `agent.jnlpregistry`
20- `agent.additionalContainers[*].image` has been renamed to `agent.additionalContainers[*].image.repository`
21- `agent.additionalContainers[*].tag` has been renamed to `agent.additionalContainers[*].image.tag`
22- `additionalAgents.*.image` has been renamed to `additionalAgents.*.image.repository`
23- `additionalAgents.*.tag` has been renamed to `additionalAgents.*.image.tag`
24- `additionalClouds.*.additionalAgents.*.image` has been renamed to `additionalClouds.*.additionalAgents.*.image.repository`
25- `additionalClouds.*.additionalAgents.*.tag` has been renamed to `additionalClouds.*.additionalAgents.*.image.tag`
26- `helmtest.bats.image` has been split up to:
27 - `helmtest.bats.image.registry`
28 - `helmtest.bats.image.repository`
29 - `helmtest.bats.image.tag`
30- `controller.adminUsername` and `controller.adminPassword` have been renamed to `controller.admin.username` and `controller.admin.password` respectively
31- `controller.adminSecret` has been renamed to `controller.admin.createSecret`
32- `backup.*` was unmaintained and has thus been removed. See the following page for alternatives: [Kubernetes Backup and Migrations](https://nubenetes.com/kubernetes-backup-migrations/).
33
34## To 4.0.0
gio20157e82026-07-22 13:10:48 +040035
Giorgi Lekveishvili35982662024-04-05 13:05:40 +040036Removes automatic `remotingSecurity` setting when using a container tag older than `2.326` (introduced in [`3.11.7`](./CHANGELOG.md#3117)). If you're using a version older than `2.326`, you should explicitly set `.controller.legacyRemotingSecurityEnabled` to `true`.
37
38## To 3.0.0
39
gio20157e82026-07-22 13:10:48 +040040- Check `securityRealm` and `authorizationStrategy` and adjust it.
Giorgi Lekveishvili35982662024-04-05 13:05:40 +040041 Otherwise, your configured users and permissions will be overridden.
gio20157e82026-07-22 13:10:48 +040042- You need to use helm version 3 as the `Chart.yaml` uses `apiVersion: v2`.
43- All XML configuration options have been removed.
Giorgi Lekveishvili35982662024-04-05 13:05:40 +040044 In case those are still in use you need to migrate to configuration as code.
45 Upgrade guide to 2.0.0 contains pointers how to do that.
gio20157e82026-07-22 13:10:48 +040046- Jenkins is now using a `StatefulSet` instead of a `Deployment`
47- terminology has been adjusted that's also reflected in values.yaml
Giorgi Lekveishvili35982662024-04-05 13:05:40 +040048 The following values from `values.yaml` have been renamed:
gio20157e82026-07-22 13:10:48 +040049 - `master` => `controller`
50 - `master.useSecurity` => `controller.adminSecret`
51 - `master.slaveListenerPort` => `controller.agentListenerPort`
52 - `master.slaveHostPort` => `controller.agentListenerHostPort`
53 - `master.slaveKubernetesNamespace` => `agent.namespace`
54 - `master.slaveDefaultsProviderTemplate` => `agent.defaultsProviderTemplate`
55 - `master.slaveJenkinsUrl` => `agent.jenkinsUrl`
56 - `master.slaveJenkinsTunnel` => `agent.jenkinsTunnel`
57 - `master.slaveConnectTimeout` => `agent.kubernetesConnectTimeout`
58 - `master.slaveReadTimeout` => `agent.kubernetesReadTimeout`
59 - `master.slaveListenerServiceAnnotations` => `controller.agentListenerServiceAnnotations`
60 - `master.slaveListenerServiceType` => `controller.agentListenerServiceType`
61 - `master.slaveListenerLoadBalancerIP` => `controller.agentListenerLoadBalancerIP`
62 - `agent.slaveConnectTimeout` => `agent.connectTimeout`
Giorgi Lekveishvili35982662024-04-05 13:05:40 +040063
gio20157e82026-07-22 13:10:48 +040064- Removed values:
65 - `master.imageTag`: use `controller.image` and `controller.tag` instead
66 - `slave.imageTag`: use `agent.image` and `agent.tag` instead
Giorgi Lekveishvili35982662024-04-05 13:05:40 +040067
68## To 2.0.0
69
70Configuration as Code is now default + container does not run as root anymore.
71
72### Configuration as Code new default
73
74Configuration is done via [Jenkins Configuration as Code Plugin](https://github.com/jenkinsci/configuration-as-code-plugin) by default.
75That means that changes in values which result in a configuration change are always applied.
76In contrast, the XML configuration was only applied during the first start and never altered.
77
78:exclamation::exclamation::exclamation:
79Attention:
80This also means if you manually altered configuration then this will most likely be reset to what was configured by default.
81It also applies to `securityRealm` and `authorizationStrategy` as they are also configured using configuration as code.
82:exclamation::exclamation::exclamation:
83
84### Image does not run as root anymore
85
86It's not recommended to run containers in Kubernetes as `root`.
87
88Attention: If you had not configured a different user before then you need to ensure that your image supports the user and group ID configured and also manually change permissions of all files so that Jenkins is still able to use them.
89
90### Summary of updated values
91
92As version 2.0.0 only updates default values and nothing else it's still possible to migrate to this version and opt out of some or all new defaults.
93All you have to do is ensure the old values are set in your installation.
94
95Here we show which values have changed and the previous default values:
96
97```yaml
98controller:
gio20157e82026-07-22 13:10:48 +040099 runAsUser: 1000 # was unset before
100 fsGroup: 1000 # was unset before
Giorgi Lekveishvili35982662024-04-05 13:05:40 +0400101 JCasC:
gio20157e82026-07-22 13:10:48 +0400102 enabled: true # was false
103 defaultConfig: true # was false
Giorgi Lekveishvili35982662024-04-05 13:05:40 +0400104 sidecars:
105 configAutoReload:
gio20157e82026-07-22 13:10:48 +0400106 enabled: true # was false
Giorgi Lekveishvili35982662024-04-05 13:05:40 +0400107```
108
109### Migration steps
110
111Migration instructions heavily depend on your current setup.
112So think of the list below more as a general guideline of what should be done.
113
114- Ensure that the Jenkins image you are using contains a user with ID 1000 and a group with the same ID.
115 That's the case for `jenkins/jenkins:lts` image, which the chart uses by default
116- Make a backup of your existing installation especially the persistent volume
117- Ensure that you have the configuration as code plugin installed
118- Export your current settings via the plugin:
119 `Manage Jenkins` -> `Configuration as Code` -> `Download Configuration`
120- prepare your values file for the update e.g. add additional configuration as code setting that you need.
121 The export taken from above might be a good starting point for this.
122 In addition, the [demos](https://github.com/jenkinsci/configuration-as-code-plugin/tree/master/demos) from the plugin itself are quite useful.
123- Test drive those setting on a separate installation
124- Put Jenkins to Quiet Down mode so that it does not accept new jobs
125 `<JENKINS_URL>/quietDown`
gio20157e82026-07-22 13:10:48 +0400126- Change permissions of all files and folders to the new user and group ID:
Giorgi Lekveishvili35982662024-04-05 13:05:40 +0400127
128 ```console
129 kubectl exec -it <jenkins_pod> -c jenkins /bin/bash
130 chown -R 1000:1000 /var/jenkins_home
131 ```
132
133- Update Jenkins
134
135## To 1.0.0
136
137Breaking changes:
138
gio20157e82026-07-22 13:10:48 +0400139- Values have been renamed to follow [helm recommended naming conventions](https://helm.sh/docs/chart_best_practices/#naming-conventions) so that all variables start with a lowercase letter and words are separated with camelCase
Giorgi Lekveishvili35982662024-04-05 13:05:40 +0400140- All resources are now using [helm recommended standard labels](https://helm.sh/docs/chart_best_practices/#standard-labels)
141
142As a result of the label changes also the selectors of the deployment have been updated.
143Those are immutable so trying an updated will cause an error like:
144
145```console
146Error: Deployment.apps "jenkins" is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{"app.kubernetes.io/component":"jenkins-controller", "app.kubernetes.io/instance":"jenkins"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable
147```
148
149In order to upgrade, [uninstall](./README.md#uninstall-chart) the Jenkins Deployment before upgrading: