diff --git a/stable/jenkins/Chart.yaml b/stable/jenkins/Chart.yaml index e9de75ec6c..82e01b1eee 100755 --- a/stable/jenkins/Chart.yaml +++ b/stable/jenkins/Chart.yaml @@ -1,6 +1,6 @@ name: jenkins home: https://jenkins.io/ -version: 0.17.0 +version: 0.18.0 appVersion: 2.121.3 description: Open source continuous integration server. It supports multiple SCM tools including CVS, Subversion and Git. It can execute Apache Ant and Apache Maven-based diff --git a/stable/jenkins/README.md b/stable/jenkins/README.md index 9d42f470fa..e811f44395 100644 --- a/stable/jenkins/README.md +++ b/stable/jenkins/README.md @@ -63,6 +63,7 @@ The following tables list the configurable parameters of the Jenkins chart and t | `Master.LoadBalancerIP` | Optional fixed external IP | Not set | | `Master.JMXPort` | Open a port, for JMX stats | Not set | | `Master.CustomConfigMap` | Use a custom ConfigMap | `false` | +| `Master.OverwriteConfig` | Replace config w/ ConfigMap on boot | `false` | | `Master.Ingress.Annotations` | Ingress annotations | `{}` | | `Master.Ingress.TLS` | Ingress TLS configuration | `[]` | | `Master.InitScripts` | List of Jenkins init scripts | Not set | diff --git a/stable/jenkins/templates/config.yaml b/stable/jenkins/templates/config.yaml index 5b6cfdc0d8..3003b1f380 100644 --- a/stable/jenkins/templates/config.yaml +++ b/stable/jenkins/templates/config.yaml @@ -192,9 +192,15 @@ data: apply_config.sh: |- mkdir -p /usr/share/jenkins/ref/secrets/; echo "false" > /usr/share/jenkins/ref/secrets/slave-to-master-security-kill-switch; - cp -n /var/jenkins_config/config.xml /var/jenkins_home; - cp -n /var/jenkins_config/jenkins.CLI.xml /var/jenkins_home; - cp -n /var/jenkins_config/jenkins.model.JenkinsLocationConfiguration.xml /var/jenkins_home; +{{- if .Values.Master.OverwriteConfig }} + cp /var/jenkins_config/config.xml /var/jenkins_home; + cp /var/jenkins_config/jenkins.CLI.xml /var/jenkins_home; + cp /var/jenkins_config/jenkins.model.JenkinsLocationConfiguration.xml /var/jenkins_home; +{{- else }} + cp --no-clobber /var/jenkins_config/config.xml /var/jenkins_home; + cp --no-clobber /var/jenkins_config/jenkins.CLI.xml /var/jenkins_home; + cp --no-clobber /var/jenkins_config/jenkins.model.JenkinsLocationConfiguration.xml /var/jenkins_home; +{{- end }} {{- if .Values.Master.InstallPlugins }} # Install missing plugins cp /var/jenkins_config/plugins.txt /var/jenkins_home; diff --git a/stable/jenkins/values.yaml b/stable/jenkins/values.yaml index 6f28b04e57..8eb80e6a1a 100644 --- a/stable/jenkins/values.yaml +++ b/stable/jenkins/values.yaml @@ -109,6 +109,10 @@ Master: # test: |- # <> CustomConfigMap: false + # By default, the configMap is only used to set the initial config the first time + # that the chart is installed. Setting `OverwriteConfig` to `true` will overwrite + # the jenkins config with the contents of the configMap every time the pod starts. + OverwriteConfig: false # Node labels and tolerations for pod assignment # ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector # ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#taints-and-tolerations-beta-feature