Compare commits

...

2 Commits

Author SHA1 Message Date
Martyn fd5da0635c Attempt overlayfs to have smaller PVCs
Signed-off-by: Martyn Ranyard <m@rtyn.berlin>
2024-03-04 11:27:08 +00:00
Martyn 9be2e70f56 Revert "We have more available ssd than rust?!"
This reverts commit 277cb3b475.

Signed-off-by: Martyn Ranyard <m@rtyn.berlin>
2024-03-02 12:16:21 +00:00
4 changed files with 36 additions and 5 deletions

View File

@ -33,4 +33,12 @@
browseable = {{ .browseable | default "yes" }}
writable = {{ .writable | default "yes" }}
{{- end }}
;EOF way past actual end of file
{{ if .Values.persistence.combineShares }}{{ range .Values.persistence.sharesToCombine }}
[{{ .destName }}]
path = /combined/{{ .destName }}
comment = Magic combined share
browseable = yes
writable = yes
{{- end }}{{ end }}
;EOF way past actual end of file

View File

@ -40,6 +40,28 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
{{- if .Values.persistence.combineShares }}
- name: overlaymagic
image: busybox
command:
- /bin/sh
- -c
- --
args:
{{- range .Values.persistence.sharesToCombine }}
- mkdir -p /combined/{{ .destName }};
mkdir -p /data/overlay-{{ .destName }};
mount -t overlay -o lowerdir={{ join ":" .shares }},upperdir=/data/overlay-{{ .destName }}-upper,workdir=/data/overlay/{{ .destName }}-work overlay /combined/{{ .destName }};
sleep infinity;
{{- end }}
lifecycle:
preStop:
exec:
command:
- /bin/sh
- -c
- {{ range .Values.persistence.sharesToCombine }}umount /combined/{{ .destName }}; {{- end }}
{{- end }}
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
command:
@ -173,4 +195,4 @@ spec:
persistentVolumeClaim:
claimName: {{ $fullName }}-{{ .name }}
{{- end }}
{{ end -}}
{{ end -}}

View File

@ -38,6 +38,10 @@ persistence:
other:
emptyDir: {}
extraPVCShares: []
combineShares: false
sharesToCombine:
- destName: ""
shares: []
privatePersistence:
enabled: false

View File

@ -29,9 +29,6 @@ spec:
- name: usenet
size: 100Gi
storageClass: longhorn-fast
- name: flacs
size: 1Ti
storageClass: longhorn-fast
path: apps-helm/samba4
repoURL: https://git.martyn.berlin/martyn/infra4talos.git
targetRevision: HEAD