Skip to content

Commit 952edff

Browse files
Merge pull request #37 from yuvipanda/autoresizer
Automatically resize the filesystem if necessary
2 parents 5a6e611 + eb86370 commit 952edff

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed

helm/jupyterhub-home-nfs/templates/deployment.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,25 @@ spec:
6969
mountPath: /etc/jupyterhub-home-nfs/mounted-secret
7070
resources: {{ toJson .Values.quotaEnforcer.resources }}
7171
{{- end }}
72+
{{- if .Values.autoResizer.enabled }}
73+
- name: auto-xfs-resizer
74+
# Use same image as quotaEnforcer as it has xfs_growfs
75+
image: "{{ .Values.quotaEnforcer.image.repository }}:{{ .Values.quotaEnforcer.image.tag }}"
76+
command:
77+
- /bin/bash
78+
- -c
79+
- |
80+
while true; do
81+
xfs_growfs /export
82+
sleep 5m
83+
done
84+
securityContext:
85+
privileged: true
86+
volumeMounts:
87+
- name: home-directories
88+
mountPath: /export
89+
resources: {{ toJson .Values.autoResizer.resources }}
90+
{{- end }}
7291
{{- if .Values.prometheusExporter.enabled }}
7392
- name: metrics-exporter
7493
image: "{{ .Values.prometheusExporter.image.repository }}:{{ .Values.prometheusExporter.image.tag }}"

helm/jupyterhub-home-nfs/values.schema.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@
1717
},
1818
"required": ["image"]
1919
},
20+
"autoResizer": {
21+
"type": "object",
22+
"properties": {
23+
"enabled": { "type": "boolean" },
24+
"resources": { "type": "object" }
25+
}
26+
},
2027
"quotaEnforcer": {
2128
"type": "object",
2229
"properties": {

helm/jupyterhub-home-nfs/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ nfsServer:
3232
allowedClients:
3333
- "127.0.0.1" # allow localhost
3434

35+
# Automatic filesystem resizer, so increases in underlying disk size
36+
# are immediately reflected in available file system
37+
autoResizer:
38+
enabled: true
39+
resources: {}
40+
3541
# Quota enforcer configuration
3642
# This container enforces the quota on the home directories
3743

0 commit comments

Comments
 (0)