Skip to content

Commit 94ef3f8

Browse files
Recommend installing plugins in custom image (#144)
- explain how to build and use a custom image - render message in NOTES.txt if default image is used or plugins are installed anyhow - smaller fixes - move httpsKeyStore further down in values.yaml Closes: #12 Signed-off-by: Torsten Walter <[email protected]>
1 parent 39e658a commit 94ef3f8

File tree

5 files changed

+113
-60
lines changed

5 files changed

+113
-60
lines changed

charts/jenkins/CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,18 @@ This file documents all notable changes to the Jenkins Helm Chart.
44
The release numbering uses [semantic versioning](http://semver.org).
55

66
Use the following links to reference issues, PRs, and commits prior to v2.6.0.
7+
78
* Issue: `https://github.com/helm/charts/issues/[issue#]`
89
* PR: `https://github.com/helm/charts/pull/[pr#]`
910
* Commit: `https://github.com/helm/charts/commit/[commit]/stable/jenkins`
1011

11-
The change log until v1.5.7 was auto-generated based on git commits. Those entries include a reference to the git commit to be able to get more details.
12+
The change log until v1.5.7 was auto-generated based on git commits.
13+
Those entries include a reference to the git commit to be able to get more details.
14+
15+
## 2.18.1
16+
17+
Recommend installing plugins in custom image
18+
1219
## 2.18.0
1320

1421
Removed /tmp volume. Making /tmp a volume causes permission issues with jmap/jstack on certain Kubernetes clusters

charts/jenkins/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v1
22
name: jenkins
33
home: https://jenkins.io/
4-
version: 2.18.0
4+
version: 2.18.1
55
appVersion: lts
66
description: Open source continuous integration server. It supports multiple SCM tools
77
including CVS, Subversion and Git. It can execute Apache Ant and Apache Maven-based

charts/jenkins/README.md

Lines changed: 48 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ For migration between major version check [migration guide](#migration-guide).
5757

5858
## Configuration
5959

60-
See [Customizing the Chart Before Installing](https://helm.sh/docs/intro/using_helm/#customizing-the-chart-before-installing). To see all configurable options with detailed comments, visit the chart's [values.yaml](./values.yaml), or run these configuration commands:
60+
See [Customizing the Chart Before Installing](https://helm.sh/docs/intro/using_helm/#customizing-the-chart-before-installing).
61+
To see all configurable options with detailed comments, visit the chart's [values.yaml](./values.yaml), or run these configuration commands:
6162

6263
```console
6364
# Helm 3
@@ -69,14 +70,58 @@ $ helm inspect values jenkins/jenkins
6970

7071
For a summary of all configurable options, see [VALUES_SUMMARY.md](./VALUES_SUMMARY.md)
7172

73+
### Consider using a custom image
74+
75+
This chart allows the user to specify plugins, which should be installed however for production use cases one should consider to build a custom Jenkins image which has all required plugins pre-installed.
76+
This way you can be sure which plugins Jenkins is using when starting up and you avoid trouble in case of connectivity issues to the Jenkins update site.
77+
78+
The [docker repository](https://github.com/jenkinsci/docker) for the Jenkins image contains [documentation](https://github.com/jenkinsci/docker#preinstalling-plugins) how to do it.
79+
80+
Here is an example how that can be done:
81+
82+
```Dockerfile
83+
FROM jenkins/jenkins:lts
84+
RUN jenkins-plugin-cli --plugins kubernetes workflow-job workflow-aggregator credentials-binding git configuration-as-code
85+
```
86+
87+
NOTE: If you want a reproducible build then you should specify a non floating tag for the image `jenkins/jenkins:2.249.3` and specify plugin versions.
88+
89+
Once you built the image and pushed it tou your registry you can specify it in your values file like this:
90+
91+
```yaml
92+
master:
93+
image: "registry/my-jenkins"
94+
tag: "v1.2.3"
95+
installPlugins: []
96+
```
97+
98+
Notice: `installPlugins` is set to an empty list to disable plugin download.
99+
100+
In case you are using a private registry you can use 'imagePullSecretName' to specify the name of the secret to use when pulling the image:
101+
102+
```yaml
103+
master:
104+
image: "registry/my-jenkins"
105+
tag: "v1.2.3"
106+
imagePullSecretName: registry-secret
107+
installPlugins: []
108+
```
109+
110+
### External URL Configuration
111+
112+
If you are using the ingress definitions provided by this chart via the `master.ingress` block the configured hostname will be the ingress hostname starting with `https://` or `http://` depending on the `tls` configuration.
113+
The Protocol can be overwritten by specifying `master.jenkinsUrlProtocol`.
114+
115+
If you are not using the provided ingress you can specify `master.jenkinsUrl` to change the url definition.
116+
72117
### Configuration as Code
73118

74119
Jenkins Configuration as Code is now a standard component in the Jenkins project.
75120
Add a key under configScripts for each configuration area, where each corresponds to a plugin or section of the UI.
76121
The keys (prior to `|` character) are just labels, and can be any value.
77122
They are only used to give the section a meaningful name.
78123
The only restriction is they must conform to RFC 1123 definition of a DNS label, so they may only contain lowercase letters, numbers, and hyphens.
79-
Each key will become the name of a configuration yaml file on the master in /var/jenkins_home/casc_configs (by default) and will be processed by the Configuration as Code Plugin during Jenkins startup.
124+
Each key will become the name of a configuration yaml file on the master in `/var/jenkins_home/casc_configs` (by default) and will be processed by the Configuration as Code Plugin during Jenkins startup.
80125
The lines after each `|` become the content of the configuration yaml file.
81126
The first line after this is a JCasC root element, e.g. jenkins, credentials, etc.
82127
Best reference is the Documentation link here: `https://<jenkins_url>/configuration-as-code`.
@@ -516,17 +561,11 @@ master:
516561
- /github-webhook
517562
```
518563

519-
### External URL Configuration
520-
If you are using the ingress definitions provided by this chart via the `master.ingress` block the configured hostname will be the ingress hostname starting with `https://` or `http://` depending on the `tls` configuration.
521-
The Protocol can be overwritten by specifying `master.jenkinsUrlProtocol`.
522-
523-
If you are not using the provided ingress you can specify `master.jenkinsUrl` to change the url definition.
524-
525564
## Migration Guide
526565

527566
### From stable repo
528567

529-
Upgrade an existing release from `stable/jenkins` to `jenkinsci/jenkins` seamlessly by ensuring you have the latest [repo info](#get-repo-info) and running the [upgrade commands](#upgrade-chart) specifying the `jenkinsci/jenkins` chart.
568+
Upgrade an existing release from `stable/jenkins` to `jenkins/jenkins` seamlessly by ensuring you have the latest [repo info](#get-repo-info) and running the [upgrade commands](#upgrade-chart) specifying the `jenkins/jenkins` chart.
530569

531570
### Major Version Upgrades
532571

charts/jenkins/templates/NOTES.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ For more information about Jenkins Configuration as Code, visit:
4141
https://jenkins.io/projects/jcasc/
4242
{{- end }}
4343

44+
{{ if (eq .Values.master.image "jenkins/jenkins") }}
45+
NOTE: Consider using a custom image with pre-installed plugins
46+
{{- else if .Values.master.installPlugins }}
47+
NOTE: Consider disabling `installPlugins` if your image already contains plugins.
48+
{{- end }}
49+
4450
{{- if .Values.persistence.enabled }}
4551
{{- else }}
4652
#################################################################################

charts/jenkins/values.yaml

Lines changed: 50 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -16,55 +16,6 @@ clusterZone: "cluster.local"
1616
renderHelmLabels: true
1717

1818
master:
19-
httpsKeyStore:
20-
jenkinsHttpsJksSecretName: ''
21-
enable: false
22-
httpPort: 8081
23-
path: "/var/jenkins_keystore"
24-
fileName: "keystore.jks"
25-
password: "password"
26-
# Convert keystore.jks files content to base64 ( cat keystore.jks | base64 ) and put the output here
27-
jenkinsKeyStoreBase64Encoded: |
28-
/u3+7QAAAAIAAAABAAAAAQANamVua2luc2NpLmNvbQAAAW2r/b1ZAAAFATCCBP0wDgYKKwYBBAEq
29-
AhEBAQUABIIE6QbCqasvoHS0pSwYqSvdydMCB9t+VNfwhFIiiuAelJfO5sSe2SebJbtwHgLcRz1Z
30-
gMtWgOSFdl3bWSzA7vrW2LED52h+jXLYSWvZzuDuh8hYO85m10ikF6QR+dTi4jra0whIFDvq3pxe
31-
TnESxEsN+DvbZM3jA3qsjQJSeISNpDjO099dqQvHpnCn18lyk7J4TWJ8sOQQb1EM2zDAfAOSqA/x
32-
QuPEFl74DlY+5DIk6EBvpmWhaMSvXzWZACGA0sYqa157dq7O0AqmuLG/EI5EkHETO4CrtBW+yLcy
33-
2dUCXOMA+j+NjM1BjrQkYE5vtSfNO6lFZcISyKo5pTFlcA7ut0Fx2nZ8GhHTn32CpeWwNcZBn1gR
34-
pZVt6DxVVkhTAkMLhR4rL2wGIi/1WRs23ZOLGKtyDNvDHnQyDiQEoJGy9nAthA8aNHa3cfdF10vB
35-
Drb19vtpFHmpvKEEhpk2EBRF4fTi644Fuhu2Ied6118AlaPvEea+n6G4vBz+8RWuVCmZjLU+7h8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0GCSqGSIb3DQEBCwUAA4IBAQAe
63-
4xc+mSvKkrKBHg9/zpkWgZUiOp4ENJCi8H4tea/PCM439v6y/kfjT/okOokFvX8N5aa1OSz2Vsrl
64-
m8kjIc6hiA7bKzT6lb0EyjUShFFZ5jmGVP4S7/hviDvgB5yEQxOPpumkdRP513YnEGj/o9Pazi5h
65-
/MwpRxxazoda9r45kqQpyG+XoM4pB+Fd3JzMc4FUGxfVPxJU4jLawnJJiZ3vqiSyaB0YyUL+Er1Q
66-
6NnqtR4gEBF0ZVlQmkycFvD4EC2boP943dLqNUvop+4R3SM1QMM6P5u8iTXtHd/VN4MwMyy1wtog
67-
hYAzODo1Jt59pcqqKJEas0C/lFJEB3frw4ImNx5fNlJYOpx+ijfQs9m39CevDq0=
6819
# Used for label app.kubernetes.io/component
6920
componentName: "jenkins-master"
7021
image: "jenkins/jenkins"
@@ -502,6 +453,56 @@ master:
502453
# Can be used to disable rendering master test resources when using helm template
503454
testEnabled: true
504455

456+
httpsKeyStore:
457+
jenkinsHttpsJksSecretName: ''
458+
enable: false
459+
httpPort: 8081
460+
path: "/var/jenkins_keystore"
461+
fileName: "keystore.jks"
462+
password: "password"
463+
# Convert keystore.jks files content to base64 ( cat keystore.jks | base64 ) and put the output here
464+
jenkinsKeyStoreBase64Encoded: |
465+
/u3+7QAAAAIAAAABAAAAAQANamVua2luc2NpLmNvbQAAAW2r/b1ZAAAFATCCBP0wDgYKKwYBBAEq
466+
AhEBAQUABIIE6QbCqasvoHS0pSwYqSvdydMCB9t+VNfwhFIiiuAelJfO5sSe2SebJbtwHgLcRz1Z
467+
gMtWgOSFdl3bWSzA7vrW2LED52h+jXLYSWvZzuDuh8hYO85m10ikF6QR+dTi4jra0whIFDvq3pxe
468+
TnESxEsN+DvbZM3jA3qsjQJSeISNpDjO099dqQvHpnCn18lyk7J4TWJ8sOQQb1EM2zDAfAOSqA/x
469+
QuPEFl74DlY+5DIk6EBvpmWhaMSvXzWZACGA0sYqa157dq7O0AqmuL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S1cMg1Djh65gi5JJLFJ7eNcoSsr/0AJ+TweIal1jJSP3t3PF
497+
9Uv21gm6xdm7HnNK66WpUUXLDTKaIs/jtagVY1bLOo9oEVeLN4nT2CYWztpMvdCyEDUzgEdDbmrP
498+
F5nKUPK5hrFqo1Dc5rUI4ZshL3Lpv398aMxv6n2adQvuL++URMEbXXBhxOrT6rCtYzbcR5fkwS9i
499+
d3Br45CoWOQro02JAepoU0MQKY5+xQ4Bq9Q7tB9BAwIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQAe
500+
4xc+mSvKkrKBHg9/zpkWgZUiOp4ENJCi8H4tea/PCM439v6y/kfjT/okOokFvX8N5aa1OSz2Vsrl
501+
m8kjIc6hiA7bKzT6lb0EyjUShFFZ5jmGVP4S7/hviDvgB5yEQxOPpumkdRP513YnEGj/o9Pazi5h
502+
/MwpRxxazoda9r45kqQpyG+XoM4pB+Fd3JzMc4FUGxfVPxJU4jLawnJJiZ3vqiSyaB0YyUL+Er1Q
503+
6NnqtR4gEBF0ZVlQmkycFvD4EC2boP943dLqNUvop+4R3SM1QMM6P5u8iTXtHd/VN4MwMyy1wtog
504+
hYAzODo1Jt59pcqqKJEas0C/lFJEB3frw4ImNx5fNlJYOpx+ijfQs9m39CevDq0=
505+
505506
agent:
506507
enabled: true
507508
image: "jenkins/inbound-agent"

0 commit comments

Comments
 (0)