apiVersion: apps/v1 kind: Deployment metadata: name: wallabag namespace: services spec: replicas: 1 # Recreate so the old pod fully terminates before the new one starts — # avoids NFS-lock races on the hostPath-backed PVC during rolling updates. strategy: type: Recreate selector: matchLabels: app: wallabag template: metadata: labels: app: wallabag 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: wallabag-data mountPath: /mnt readOnly: true - name: nfs-check-images 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: wallabag-images mountPath: /mnt readOnly: true containers: - name: wallabag image: wallabag/wallabag ports: - containerPort: 80 env: - name: SYMFONY__ENV__DOMAIN_NAME value: "https://bag.f3s.buetow.org" volumeMounts: - name: wallabag-data mountPath: /var/www/wallabag/data - name: wallabag-images mountPath: /var/www/wallabag/web/assets/images volumes: - name: wallabag-data persistentVolumeClaim: claimName: wallabag-data-pvc - name: wallabag-images persistentVolumeClaim: claimName: wallabag-images-pvc --- apiVersion: v1 kind: Service metadata: labels: app: wallabag name: wallabag-service namespace: services spec: ports: - name: web port: 80 protocol: TCP targetPort: 80 selector: app: wallabag