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:
parent
2d9a71ea7b
commit
a0401cc979
8 changed files with 34 additions and 47 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
15
argocd/manifests/kiwix/pv.yaml
Normal file
15
argocd/manifests/kiwix/pv.yaml
Normal 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
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
|
||||||
15
argocd/manifests/torrent/pv.yaml
Normal file
15
argocd/manifests/torrent/pv.yaml
Normal 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
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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 }}"
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue