Skip to content

Commit

Permalink
Merge pull request #30 from hugoprudente/issue/27
Browse files Browse the repository at this point in the history
Add #27 shared capabilities for mounting extra directories.
  • Loading branch information
hugoprudente authored Apr 11, 2021
2 parents cc0d8df + 43b0afb commit c99cf19
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 2 deletions.
2 changes: 1 addition & 1 deletion incubator/foundry-vtt/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: foundry-vtt
description: Foundry Virtual Tabletop
type: application
version: 0.2.5
version: 0.2.6
appVersion: 0.7.9
keywords:
- game
Expand Down
22 changes: 21 additions & 1 deletion incubator/foundry-vtt/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,13 @@ spec:
volumeMounts:
- name: data
mountPath: /data
{{- if eq .Values.persistence.shared.enabled true }}
{{- range $i, $mount := .Values.persistence.shared.mounts }}
- name: {{ printf "%s-%s" "shared" ($i|toString) }}
mountPath: {{ printf "%s%s" "/data/Data" $mount.containerPath }}
readOnly: {{ $mount.readOnly }}
{{- end }}
{{- end }}
{{- if eq .Values.foundryvtt.s3.awsConfig "file" }}
- name: secret-aws
mountPath: "/etc/secretaws/"
Expand Down Expand Up @@ -216,4 +223,17 @@ spec:
claimName: {{ template "foundry-vtt.fullname" . }}
{{- else }}
emptyDir: {}
{{- end }}
{{- end }}
{{- if eq .Values.persistence.shared.enabled true }}
{{- range $i, $mount := .Values.persistence.shared.mounts }}
- name: {{ printf "%s-%s" "shared" ($i|toString) }}
{{ if eq $mount.type "bind" }}
hostPath:
path: {{ $mount.hostPath }}
type: Directory
{{ else if eq $mount.type "pvc" }}
persistentVolumeClaim:
claimName: {{ $mount.claimName }}
{{ end }}
{{- end }}
{{- end }}
18 changes: 18 additions & 0 deletions incubator/foundry-vtt/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,24 @@ persistence:
enabled: false
Size: 5Gi

shared:
# Enable tha shared mount for a NFS file system or a shared bind point with for
# sharing assets between multiple game instances when not using s3.
enabled: false
mounts:
## containerPath: is relative to the /data/Data
## type: bind or pvc
## hostpath: only used for bind mount
## readOnly: enable read only directories
## clainName: to be used mainly with NFS CSI PV/PVC
# - containerPath: "/shared"
# type: bind
# hostPath: /files/assets
# readOnly: true
# - containerPath: "/files/assets"
# type: pvc
# claimName: "pvc-files"

# felddy/foundryvtt-docker container extra customizations.
container:
## Set a path to cache downloads of the Foundry distribution archive and speed up subsequent container startups. The path should be in /data or another persistent mount point in the container. e.g.; /data/cache
Expand Down

0 comments on commit c99cf19

Please sign in to comment.