[stable/gocd] extra volume mounts without persistence (#9873)

* [stable/gocd] extraVolumeMounts without persistence

Make {server,agent}.persistence.{extraVolumes,extraVolumeMounts}
functional even if persistence is disabled.

Mounting additional volumes makes sense even without
persistence, for example for mounting an emptyDir docker
volume into the agent when using docker-in-docker

Signed-off-by: Matthias Kümmerer <matthias@matthias-k.org>

* [stable/gocd] bump chart version

Signed-off-by: Matthias Kümmerer <matthias@matthias-k.org>
This commit is contained in:
matthias-k
2018-12-13 12:16:21 -08:00
committed by Kubernetes Prow Robot
parent b682081bb2
commit ae2cf5bf65
4 changed files with 17 additions and 13 deletions
+4
View File
@@ -1,3 +1,7 @@
### 1.5.8
* [cee475aa](https://github.com/kubernetes/charts/commit/cee475aa):
- Enable extra volume mounts without persistence
### 1.5.7
* [c663a531](https://github.com/kubernetes/charts/commit/c663a531):
- Bump up GoCD app version to 18.11.0
+1 -1
View File
@@ -1,6 +1,6 @@
name: gocd
home: https://www.gocd.org/
version: 1.5.7
version: 1.5.8
appVersion: 18.11.0
description: GoCD is an open-source continuous delivery server to model and visualize complex workflows with ease.
icon: https://gocd.github.io/assets/images/go-icon-black-192x192.png
@@ -26,16 +26,16 @@ spec:
release: {{ .Release.Name | quote }}
component: agent
spec:
{{- if or .Values.agent.persistence.enabled .Values.agent.security.ssh.enabled }}
{{- if or .Values.agent.persistence.enabled (or .Values.agent.security.ssh.enabled .Values.agent.persistence.extraVolumes) }}
volumes:
{{- end }}
{{- if .Values.agent.persistence.enabled }}
- name: goagent-vol
persistentVolumeClaim:
claimName: {{ .Values.agent.persistence.existingClaim | default (printf "%s-%s" (include "gocd.fullname" .) "agent") }}
{{- if ne (len .Values.agent.persistence.extraVolumes) 0 }}
{{- end }}
{{- if ne (len .Values.agent.persistence.extraVolumes) 0 }}
{{ toYaml .Values.agent.persistence.extraVolumes | indent 8 }}
{{- end }}
{{- end }}
{{- if .Values.agent.security.ssh.enabled }}
- name: ssh-secrets
@@ -105,7 +105,7 @@ spec:
port: 8152
initialDelaySeconds: {{ .Values.agent.healthCheck.initialDelaySeconds }}
{{- end }}
{{- if or .Values.agent.persistence.enabled .Values.agent.security.ssh.enabled }}
{{- if or .Values.agent.persistence.enabled (or .Values.agent.security.ssh.enabled .Values.agent.persistence.extraVolumeMounts) }}
volumeMounts:
{{- end }}
{{- if .Values.agent.persistence.enabled }}
@@ -115,9 +115,9 @@ spec:
- name: {{ .Values.agent.persistence.name.dockerEntryPoint }}
mountPath: /docker-entrypoint.d
subPath: {{ .Values.agent.persistence.subpath.dockerEntryPoint }}
{{- if ne (len .Values.agent.persistence.extraVolumeMounts) 0 }}
{{- end }}
{{- if ne (len .Values.agent.persistence.extraVolumeMounts) 0 }}
{{ toYaml .Values.agent.persistence.extraVolumeMounts | indent 12 }}
{{- end }}
{{- end }}
{{- if .Values.agent.security.ssh.enabled }}
- name: ssh-secrets
@@ -26,7 +26,7 @@ spec:
component: server
spec:
serviceAccountName: {{ template "gocd.serviceAccountName" . }}
{{- if or .Values.server.shouldPreconfigure (or .Values.server.persistence.enabled .Values.server.security.ssh.enabled) }}
{{- if or .Values.server.shouldPreconfigure (or .Values.server.persistence.enabled (or .Values.server.security.ssh.enabled .Values.server.persistence.extraVolumes)) }}
volumes:
{{- end }}
{{- if .Values.server.shouldPreconfigure }}
@@ -38,9 +38,9 @@ spec:
- name: goserver-vol
persistentVolumeClaim:
claimName: {{ .Values.server.persistence.existingClaim | default (printf "%s-%s" (include "gocd.fullname" .) "server") }}
{{- if ne (len .Values.server.persistence.extraVolumes) 0 }}
{{- end }}
{{- if ne (len .Values.server.persistence.extraVolumes) 0 }}
{{ toYaml .Values.server.persistence.extraVolumes | indent 8 }}
{{- end }}
{{- end }}
{{- if .Values.server.security.ssh.enabled }}
- name: ssh-secrets
@@ -80,7 +80,7 @@ spec:
initialDelaySeconds: {{ .Values.server.healthCheck.initialDelaySeconds }}
periodSeconds: {{ .Values.server.healthCheck.periodSeconds }}
failureThreshold: {{ .Values.server.healthCheck.failureThreshold }}
{{- if or .Values.server.shouldPreconfigure (or .Values.server.persistence.enabled .Values.server.security.ssh.enabled) }}
{{- if or .Values.server.shouldPreconfigure (or .Values.server.persistence.enabled (or .Values.server.security.ssh.enabled .Values.server.persistence.extraVolumeMounts)) }}
volumeMounts:
{{- end }}
{{- if .Values.server.shouldPreconfigure }}
@@ -98,9 +98,9 @@ spec:
- name: {{ .Values.server.persistence.name.dockerEntryPoint }}
mountPath: /docker-entrypoint.d
subPath: {{ .Values.server.persistence.subpath.dockerEntryPoint }}
{{- if ne (len .Values.server.persistence.extraVolumeMounts) 0 }}
{{- end }}
{{- if ne (len .Values.server.persistence.extraVolumeMounts) 0 }}
{{ toYaml .Values.server.persistence.extraVolumeMounts | indent 12 }}
{{- end }}
{{- end }}
{{- if .Values.server.security.ssh.enabled }}
- name: ssh-secrets