Add TrueNAS pvc for immich

This commit is contained in:
Daniel Cosme
2026-05-01 13:48:44 -04:00
parent 5e4c4b7628
commit 4a80492c06
4 changed files with 27 additions and 9 deletions

View File

@@ -4,4 +4,5 @@ metadata:
name: immich
namespace: immich
resources:
- uploads-pvc.yaml
- namespace.yaml

View File

@@ -0,0 +1,13 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: immich-pvc
namespace: immich
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1Gi
storageClassName: truenas-nfs
status: {}

View File

@@ -4,16 +4,16 @@ metadata:
name: truenas-csi
namespace: truenas-csi
resources:
- node-binding.yaml
- CSIDriver.yaml
- controller-cluster-role.yaml
- node-deamonset.yaml
- config.yaml
- nfs-storage-class.yaml
- controller-deployment.yaml
- controller-binding.yaml
- node-cluster-role.yaml
- node-deamonset.yaml
- CSIDriver.yaml
- iscsi-storage-class.yaml
- namespace.yaml
- controller-deployment.yaml
- controller-service-account.yaml
- controller-binding.yaml
- controller-cluster-role.yaml
- node-service-account.yaml
- node-cluster-role.yaml
- node-binding.yaml

View File

@@ -26,10 +26,13 @@ var Secret = struct {
var meta kube.Metadata
var Namespace = kube.Namespace(root.Immich.Name)
var srv core.Service
var pvc core.PersistentVolumeClaim
var uploads_pvc core.PersistentVolumeClaim
func init() {
meta = kube.NewMetadata(root.Immich.Name, Namespace)
uploads_pvc = meta.PVC()
uploads_pvc.Spec.StorageClassName = new(root.TrueNASSTorageClassNFS)
uploads_pvc.Spec.AccessModes = []core.PersistentVolumeAccessMode{core.ReadWriteMany}
}
func Stack() stack.Stack {
@@ -37,6 +40,7 @@ func Stack() stack.Stack {
meta,
map[string]any{
"namespace": Namespace,
"uploads-pvc": uploads_pvc,
},
)
return kz.Stack("immich")