Switch from SMB CSI to hostPath for torrents volume

SMB CSI driver doesn't work with minikube podman driver due to
kernel-level mount restrictions. Use hostPath instead since the
SMB share is already mounted on indri at /Volumes/torrents.

- Remove SMB PV and secret template
- Add hostPath PVs for torrent and kiwix namespaces
- Both PVs point to same /Volumes/torrents directory

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Erich Blume 2026-01-20 20:18:15 -08:00
commit a0401cc979
8 changed files with 34 additions and 47 deletions

View file

@ -3,6 +3,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
namespace: kiwix namespace: kiwix
resources: resources:
- pv.yaml
- pvc.yaml - pvc.yaml
- configmap-zim-torrents.yaml - configmap-zim-torrents.yaml
- configmap-sync-script.yaml - configmap-sync-script.yaml

View file

@ -0,0 +1,15 @@
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: torrents-pv-kiwix
spec:
capacity:
storage: 1Ti
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Retain
storageClassName: ""
hostPath:
path: /Volumes/torrents
type: Directory

View file

@ -8,7 +8,7 @@ spec:
accessModes: accessModes:
- ReadWriteMany # Need write for the sync sidecar to work - ReadWriteMany # Need write for the sync sidecar to work
storageClassName: "" storageClassName: ""
volumeName: torrents-smb-pv volumeName: torrents-pv-kiwix
resources: resources:
requests: requests:
storage: 1Ti storage: 1Ti

View file

@ -3,9 +3,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
namespace: torrent namespace: torrent
resources: resources:
- pv-smb.yaml - pv.yaml
- pvc.yaml - pvc.yaml
- deployment.yaml - deployment.yaml
- service.yaml - service.yaml
- ingress-tailscale.yaml - ingress-tailscale.yaml
# Note: secret-smb.yaml.tpl must be applied manually with credentials from 1Password

View file

@ -1,29 +0,0 @@
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: torrents-smb-pv
spec:
capacity:
storage: 1Ti
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Retain
storageClassName: ""
mountOptions:
- dir_mode=0777
- file_mode=0777
- uid=1000
- gid=1000
- noperm
- mfsymlinks
- cache=strict
- noserverino # Required to prevent data corruption
csi:
driver: smb.csi.k8s.io
volumeHandle: torrents-smb-pv
volumeAttributes:
source: //sifaka/torrents
nodeStageSecretRef:
name: smbcreds
namespace: torrent

View file

@ -0,0 +1,15 @@
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: torrents-pv
spec:
capacity:
storage: 1Ti
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Retain
storageClassName: ""
hostPath:
path: /Volumes/torrents
type: Directory

View file

@ -8,7 +8,7 @@ spec:
accessModes: accessModes:
- ReadWriteMany - ReadWriteMany
storageClassName: "" storageClassName: ""
volumeName: torrents-smb-pv volumeName: torrents-pv
resources: resources:
requests: requests:
storage: 1Ti storage: 1Ti

View file

@ -1,14 +0,0 @@
# Template - apply manually with credentials from 1Password
# kubectl --context=minikube-indri create secret generic smbcreds \
# --namespace torrent \
# --from-literal=username=$(op read "op://vg6xf6vvfmoh5hqjjhlhbeoaie/synology-smb-k8s/username") \
# --from-literal=password=$(op read "op://vg6xf6vvfmoh5hqjjhlhbeoaie/synology-smb-k8s/password")
apiVersion: v1
kind: Secret
metadata:
name: smbcreds
namespace: torrent
type: Opaque
stringData:
username: "{{ op://vg6xf6vvfmoh5hqjjhlhbeoaie/synology-smb-k8s/username }}"
password: "{{ op://vg6xf6vvfmoh5hqjjhlhbeoaie/synology-smb-k8s/password }}"