Skip to content

Commit e116f76

Browse files
committed
These changes to the shoebox-helm chart appear to conditionally enable mounting a volume named config-volume at /app/config within the deployed container.
Previously, the volume mount was unconditionally included in the deployment template. This update moves the `volumeMounts` section under a conditional block controlled by the `Values.volumeMounts` setting. If this setting is defined (and evaluates to a truthy value in the template rendering), then the `config-volume` mount, along with any other mounts defined in `Values.volumeMounts`, will be included in the deployment. If `Values.volumeMounts` isn't defined or is falsy, the `config-volume` mount will be omitted. The `Chart.yaml` file is also updated, bumping the chart version from 0.0.4 to 0.0.5, reflecting this change. This is standard practice for Helm charts to track changes. In essence, this change provides more flexibility in deployments. Users can now choose whether or not to mount the `config-volume` based on their needs by setting the `Values.volumeMounts` parameter during helm install or upgrade. This is useful for scenarios where configuration might be provided through other means, like ConfigMaps or environment variables, and mounting a specific volume is not always desired.
1 parent 092353e commit e116f76

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

charts/shoebox/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ apiVersion: v2
22
name: shoebox-helm
33
description: A Helm chart for Kubernetes to deploy Shoebox
44
type: application
5-
version: 0.0.4
5+
version: 0.0.5

charts/shoebox/templates/deployment.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ spec:
2121
imagePullPolicy: {{ .Values.image.pullPolicy }}
2222
ports:
2323
- containerPort: {{ .Values.service.port }}
24-
volumeMounts:
25-
- name: config-volume
26-
mountPath: /app/config
2724
env:
2825
{{- range $key, $val := .Values.customEnv }}
2926
{{- if $val.fromSecret.enabled }}
@@ -39,6 +36,8 @@ spec:
3936
{{- end }}
4037
{{- if .Values.volumeMounts }}
4138
volumeMounts:
39+
- name: config-volume
40+
mountPath: /app/config
4241
{{- toYaml .Values.volumeMounts | default "" | nindent 12 }}
4342
{{- end }}
4443
volumes:

0 commit comments

Comments
 (0)