Skip to content

Commit

Permalink
fix: Check if extraVolumes.volumeMounts is defined (#110)
Browse files Browse the repository at this point in the history
* fix: Check if extraVolumes.volumeMounts is defined

It could be useful to create volumes without actually mounting them in
case if they are used exclusively for init containers

* chore: Bump versions
  • Loading branch information
eaglesemanation authored Mar 6, 2022
1 parent 6c21e2b commit 2fea96d
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion charts/minecraft-bedrock/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: minecraft-bedrock
version: 1.2.0
version: 1.2.1
appVersion: SeeValues
home: https://minecraft.net/
description: Minecraft server
Expand Down
4 changes: 3 additions & 1 deletion charts/minecraft-bedrock/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ spec:
- name: datadir
mountPath: /data
{{- range .Values.extraVolumes }}
{{- toYaml .volumeMounts | nindent 8 }}
{{- if .volumeMounts }}
{{- toYaml .volumeMounts | nindent 8 }}
{{- end }}
{{- end }}
volumes:
- name: datadir
Expand Down
2 changes: 1 addition & 1 deletion charts/minecraft-proxy/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: minecraft-proxy
version: 2.5.0
version: 2.5.1
appVersion: SeeValues
description: Minecraft proxy server (BungeeCord, Waterfall, Velocity, etc.)
keywords:
Expand Down
4 changes: 3 additions & 1 deletion charts/minecraft-proxy/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ spec:
subPath: config.yml
{{- end }}
{{- range .Values.extraVolumes }}
{{- toYaml .volumeMounts | nindent 8 }}
{{- if .volumeMounts }}
{{- toYaml .volumeMounts | nindent 8 }}
{{- end }}
{{- end }}
volumes:
- name: datadir
Expand Down
2 changes: 1 addition & 1 deletion charts/minecraft/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: minecraft
version: 3.8.1
version: 3.8.2
appVersion: SeeValues
home: https://minecraft.net/
description: Minecraft server
Expand Down
8 changes: 6 additions & 2 deletions charts/minecraft/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ spec:
mountPath: /config/rclone
{{- end }}
{{- range .Values.extraVolumes }}
{{- toYaml .volumeMounts | nindent 8 }}
{{- if .volumeMounts }}
{{- toYaml .volumeMounts | nindent 8 }}
{{- end }}
{{- end }}
{{- end }}
- name: {{ template "minecraft.fullname" . }}
Expand Down Expand Up @@ -334,7 +336,9 @@ spec:
mountPath: {{ default "/backups" .Values.mcbackup.destDir }}
readOnly: true
{{- range .Values.extraVolumes }}
{{- toYaml .volumeMounts | nindent 8 }}
{{- if .volumeMounts }}
{{- toYaml .volumeMounts | nindent 8 }}
{{- end }}
{{- end }}
{{- if .Values.sidecarContainers }}
{{- toYaml .Values.sidecarContainers | nindent 6 }}
Expand Down

0 comments on commit 2fea96d

Please sign in to comment.