diff options
| author | Paul Buetow <paul@buetow.org> | 2026-07-03 23:15:33 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-07-03 23:15:33 +0300 |
| commit | 7f4b152880bdbd7e0b603cfea43a766b6fb56823 (patch) | |
| tree | 5a946625e5de1b2bd1d21d8538aaa277777548e4 | |
| parent | a62a6048bd65a9cf4267cf77141e1818fd72a16c (diff) | |
f3s/ychat: add persistent SQLite volume, bump image to 67babb2
ychat now requires SQLite (no more no-DB build), so registered accounts
need to survive pod restarts. Adds a hostPath-backed PV/PVC for
/app/data, an NFS sentinel initContainer (same pattern as other f3s
charts), and points the image at the SQLite-mandatory build.
| -rw-r--r-- | f3s/ychat/helm-chart/Chart.yaml | 6 | ||||
| -rw-r--r-- | f3s/ychat/helm-chart/templates/deployment.yaml | 28 | ||||
| -rw-r--r-- | f3s/ychat/helm-chart/templates/persistent-volume.yaml | 27 |
3 files changed, 56 insertions, 5 deletions
diff --git a/f3s/ychat/helm-chart/Chart.yaml b/f3s/ychat/helm-chart/Chart.yaml index 1326171..5150739 100644 --- a/f3s/ychat/helm-chart/Chart.yaml +++ b/f3s/ychat/helm-chart/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: ychat -description: yChat revival (Mode A, in-memory guest chat) for f3s +description: yChat revival (SQLite-backed, persistent registered accounts) for f3s type: application -version: 0.1.0 -appVersion: "6c3a65b"
\ No newline at end of file +version: 0.2.0 +appVersion: "67babb2"
\ No newline at end of file diff --git a/f3s/ychat/helm-chart/templates/deployment.yaml b/f3s/ychat/helm-chart/templates/deployment.yaml index 991d75c..53dc672 100644 --- a/f3s/ychat/helm-chart/templates/deployment.yaml +++ b/f3s/ychat/helm-chart/templates/deployment.yaml @@ -17,6 +17,23 @@ spec: labels: app: ychat spec: + initContainers: + - name: nfs-check-data + image: busybox:stable + command: + - sh + - -c + - | + test -f /mnt/.nfs-sentinel || ( + echo "ERROR: NFS sentinel missing at /mnt/.nfs-sentinel" + echo "refusing to start; node likely has NFS unmounted" + echo "pod would otherwise bind-mount the local-XFS shadow" + exit 1 + ) + volumeMounts: + - name: data + mountPath: /mnt + readOnly: true securityContext: runAsNonRoot: true runAsUser: 1000 @@ -24,7 +41,9 @@ spec: fsGroup: 1000 containers: - name: ychat - image: registry.lan.buetow.org:30001/ychat:6c3a65b + # SQLite is now mandatory (see ychat/DOCKER.md); the image tag tracks + # the ychat repo commit that build was cut from. + image: registry.lan.buetow.org:30001/ychat:67babb2 imagePullPolicy: IfNotPresent securityContext: allowPrivilegeEscalation: false @@ -50,8 +69,13 @@ spec: mountPath: /app/log - name: tmp mountPath: /tmp + - name: data + mountPath: /app/data volumes: - name: log emptyDir: {} - name: tmp - emptyDir: {}
\ No newline at end of file + emptyDir: {} + - name: data + persistentVolumeClaim: + claimName: ychat-data-pvc
\ No newline at end of file diff --git a/f3s/ychat/helm-chart/templates/persistent-volume.yaml b/f3s/ychat/helm-chart/templates/persistent-volume.yaml new file mode 100644 index 0000000..2bb7594 --- /dev/null +++ b/f3s/ychat/helm-chart/templates/persistent-volume.yaml @@ -0,0 +1,27 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: ychat-data-pv +spec: + capacity: + storage: 1Gi + volumeMode: Filesystem + accessModes: + - ReadWriteOnce + persistentVolumeReclaimPolicy: Retain + hostPath: + path: /data/nfs/k3svolumes/ychat/data + type: Directory +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: ychat-data-pvc + namespace: services +spec: + storageClassName: "" + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi |
