Mount always ref/secrets. (#23137)

The `ref/secrets` is mounted only when `master.enableXmlConfig == true`.
This is bug. The `ref/secrets` must be always mounted. Just because

`master.secretsFilesSecret` and `master.enableXmlConfig` are unrelated, as well as:

./templates/config.yaml has unconditional:

  apply_config.sh: |-
    echo "applying Jenkins configuration"
    mkdir -p {{ .Values.master.jenkinsRef }}/secrets/;

This mkdir will fail in UID != 0.
We need to mount always secrets.

Signed-off-by: Andrei Stepanov <astepano@redhat.com>
This commit is contained in:
Andrei-Stepanov
2020-07-13 20:15:20 -07:00
committed by GitHub
parent 5785d0df93
commit c1561c8fab
3 changed files with 9 additions and 4 deletions
+5
View File
@@ -5,6 +5,11 @@ numbering uses [semantic versioning](http://semver.org).
NOTE: The change log until version 1.5.7 is auto generated based on git commits. Those include a reference to the git commit to be able to get more details.
## 2.3.1
Always mount {{ .Values.master.jenkinsRef }}/secrets/ directory. Previous it
was mounted only when `master.enableXmlConfig` was enabled.
## 2.3.0
Add an option to specify pod based on labels that can connect to master if NetworkPolicy is enabled
+1 -1
View File
@@ -1,7 +1,7 @@
apiVersion: v1
name: jenkins
home: https://jenkins.io/
version: 2.3.0
version: 2.3.1
appVersion: lts
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
@@ -138,9 +138,9 @@ spec:
name: jenkins-jobs
readOnly: true
{{- end }}
{{- end }}
- mountPath: {{ .Values.master.jenkinsRef }}/secrets/
name: secrets-dir
{{- end }}
{{- if .Values.master.secretsFilesSecret }}
- mountPath: /var/jenkins_secrets
name: jenkins-secrets
@@ -287,10 +287,10 @@ spec:
name: jenkins-jobs
readOnly: true
{{- end }}
{{- end }}
- mountPath: {{ .Values.master.jenkinsRef }}/secrets/
name: secrets-dir
readOnly: false
{{- end }}
{{- if or .Values.master.secretsFilesSecret }}
- mountPath: /var/jenkins_secrets
name: jenkins-secrets
@@ -369,9 +369,9 @@ spec:
configMap:
name: {{ template "jenkins.fullname" . }}-jobs
{{- end }}
{{- end }}
- name: secrets-dir
emptyDir: {}
{{- end }}
{{- if .Values.master.secretsFilesSecret }}
- name: jenkins-secrets
secret: