diff options
Diffstat (limited to 'f3s')
| -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 |
