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