From ae2cf5bf65c3a25642663d6c8cbd73d6e413d72f Mon Sep 17 00:00:00 2001 From: matthias-k Date: Thu, 13 Dec 2018 21:16:21 +0100 Subject: [PATCH] [stable/gocd] extra volume mounts without persistence (#9873) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [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 * [stable/gocd] bump chart version Signed-off-by: Matthias Kümmerer --- stable/gocd/CHANGELOG.md | 4 ++++ stable/gocd/Chart.yaml | 2 +- stable/gocd/templates/gocd-agent-deployment.yaml | 12 ++++++------ stable/gocd/templates/gocd-server-deployment.yaml | 12 ++++++------ 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/stable/gocd/CHANGELOG.md b/stable/gocd/CHANGELOG.md index 3096a107cd..16b0a63d5c 100644 --- a/stable/gocd/CHANGELOG.md +++ b/stable/gocd/CHANGELOG.md @@ -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 diff --git a/stable/gocd/Chart.yaml b/stable/gocd/Chart.yaml index a0bdd95e84..b4c50988c2 100644 --- a/stable/gocd/Chart.yaml +++ b/stable/gocd/Chart.yaml @@ -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 diff --git a/stable/gocd/templates/gocd-agent-deployment.yaml b/stable/gocd/templates/gocd-agent-deployment.yaml index 3d89357678..3a07b44c03 100644 --- a/stable/gocd/templates/gocd-agent-deployment.yaml +++ b/stable/gocd/templates/gocd-agent-deployment.yaml @@ -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 diff --git a/stable/gocd/templates/gocd-server-deployment.yaml b/stable/gocd/templates/gocd-server-deployment.yaml index 34354986f8..ec6a49d66e 100644 --- a/stable/gocd/templates/gocd-server-deployment.yaml +++ b/stable/gocd/templates/gocd-server-deployment.yaml @@ -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