From 8cbc9ab03f4a46b8e6311c7831a64d9d06886847 Mon Sep 17 00:00:00 2001 From: Daniel Cosme Date: Fri, 1 May 2026 14:47:10 -0400 Subject: [PATCH] Remove TrueNAS CSI --- apps/hydra/immich/kustomization.yaml | 2 +- apps/hydra/linkding/kustomization.yaml | 4 +- cmd/apps/main.go | 7 +- .../hydra/truenas-csi/CSIDriver.yaml | 11 -- infrastructure/hydra/truenas-csi/config.yaml | 12 -- .../hydra/truenas-csi/controller-binding.yaml | 12 -- .../truenas-csi/controller-cluster-role.yaml | 150 --------------- .../truenas-csi/controller-deployment.yaml | 153 ---------------- .../controller-service-account.yaml | 5 - .../truenas-csi/iscsi-storage-class.yaml | 13 -- .../hydra/truenas-csi/kustomization.yaml | 19 -- .../hydra/truenas-csi/namespace.yaml | 6 - .../hydra/truenas-csi/nfs-storage-class.yaml | 11 -- .../hydra/truenas-csi/node-binding.yaml | 12 -- .../hydra/truenas-csi/node-cluster-role.yaml | 27 --- .../hydra/truenas-csi/node-deamonset.yaml | 171 ------------------ .../truenas-csi/node-service-account.yaml | 5 - 17 files changed, 6 insertions(+), 614 deletions(-) delete mode 100644 infrastructure/hydra/truenas-csi/CSIDriver.yaml delete mode 100644 infrastructure/hydra/truenas-csi/config.yaml delete mode 100644 infrastructure/hydra/truenas-csi/controller-binding.yaml delete mode 100644 infrastructure/hydra/truenas-csi/controller-cluster-role.yaml delete mode 100644 infrastructure/hydra/truenas-csi/controller-deployment.yaml delete mode 100644 infrastructure/hydra/truenas-csi/controller-service-account.yaml delete mode 100644 infrastructure/hydra/truenas-csi/iscsi-storage-class.yaml delete mode 100644 infrastructure/hydra/truenas-csi/kustomization.yaml delete mode 100644 infrastructure/hydra/truenas-csi/namespace.yaml delete mode 100644 infrastructure/hydra/truenas-csi/nfs-storage-class.yaml delete mode 100644 infrastructure/hydra/truenas-csi/node-binding.yaml delete mode 100644 infrastructure/hydra/truenas-csi/node-cluster-role.yaml delete mode 100644 infrastructure/hydra/truenas-csi/node-deamonset.yaml delete mode 100644 infrastructure/hydra/truenas-csi/node-service-account.yaml diff --git a/apps/hydra/immich/kustomization.yaml b/apps/hydra/immich/kustomization.yaml index a73d426..e34cda2 100644 --- a/apps/hydra/immich/kustomization.yaml +++ b/apps/hydra/immich/kustomization.yaml @@ -4,6 +4,6 @@ metadata: name: immich namespace: immich resources: +- namespace.yaml - uploads-pvc.yaml - deployment.yaml -- namespace.yaml diff --git a/apps/hydra/linkding/kustomization.yaml b/apps/hydra/linkding/kustomization.yaml index c922b44..f79e113 100644 --- a/apps/hydra/linkding/kustomization.yaml +++ b/apps/hydra/linkding/kustomization.yaml @@ -4,7 +4,7 @@ metadata: name: linking namespace: linkding resources: -- namespace.yaml -- srv.yaml - pvc.yaml - deployment.yaml +- namespace.yaml +- srv.yaml diff --git a/cmd/apps/main.go b/cmd/apps/main.go index d83be59..92aaa4a 100644 --- a/cmd/apps/main.go +++ b/cmd/apps/main.go @@ -12,7 +12,6 @@ import ( "danicos.dev/daniel/homelab/pkg/longhorn" "danicos.dev/daniel/homelab/pkg/monitoring" "danicos.dev/daniel/homelab/pkg/root" - "danicos.dev/daniel/homelab/pkg/truenas" /* apps "k8s.io/api/apps/v1" core "k8s.io/api/core/v1" @@ -25,9 +24,9 @@ func main() { assertNoErr(err) hydra_infrastructure := map[string]stack.Stack{ - "monitoring": monitoring.Stack(), - "longhorn": longhorn.Stack(), - "truenas-csi": truenas.Stack(), + "monitoring": monitoring.Stack(), + "longhorn": longhorn.Stack(), + // "truenas-csi": truenas.Stack(), "cloud-native-pg": cnpg.Stack(), } for name, s := range hydra_infrastructure { diff --git a/infrastructure/hydra/truenas-csi/CSIDriver.yaml b/infrastructure/hydra/truenas-csi/CSIDriver.yaml deleted file mode 100644 index 8b7e149..0000000 --- a/infrastructure/hydra/truenas-csi/CSIDriver.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: storage.k8s.io/v1 -kind: CSIDriver -metadata: - name: cis.truenas.io -spec: - attachRequired: true - fsGroupPolicy: File - podInfoOnMount: true - volumeLifecycleModes: - - Ephemeral - - Persistent diff --git a/infrastructure/hydra/truenas-csi/config.yaml b/infrastructure/hydra/truenas-csi/config.yaml deleted file mode 100644 index 6711516..0000000 --- a/infrastructure/hydra/truenas-csi/config.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: v1 -data: - defaultPool: datapool - iscsiIQNBase: iqn.2026-04.net.ts.orca-uaru.apex-truenas - iscsiPortal: apex-truenas.orca-uaru.ts.net:3260 - nfsServer: apex-truenas.orca-uaru.ts.net - truenasInsecure: "true" - truenasURL: wss://apex-truenas.orca-uaru.ts.net/api/current -kind: ConfigMap -metadata: - name: truenas-csi - namespace: truenas-csi diff --git a/infrastructure/hydra/truenas-csi/controller-binding.yaml b/infrastructure/hydra/truenas-csi/controller-binding.yaml deleted file mode 100644 index 010d7f8..0000000 --- a/infrastructure/hydra/truenas-csi/controller-binding.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: truenas-csi-controller-role-binding -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: truenas-csi-controller-role -subjects: -- kind: ServiceAccount - name: truenas-csi-controller-sa - namespace: truenas-csi diff --git a/infrastructure/hydra/truenas-csi/controller-cluster-role.yaml b/infrastructure/hydra/truenas-csi/controller-cluster-role.yaml deleted file mode 100644 index ab521f4..0000000 --- a/infrastructure/hydra/truenas-csi/controller-cluster-role.yaml +++ /dev/null @@ -1,150 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: truenas-csi-controller-role -rules: -- apiGroups: - - "" - resources: - - persistentvolumes - verbs: - - get - - create - - update - - patch - - delete - - list - - watch -- apiGroups: - - "" - resources: - - persistentvolumeclaims - verbs: - - get - - list - - watch - - update - - patch -- apiGroups: - - "" - resources: - - persistentvolumeclaims/status - verbs: - - update - - patch -- apiGroups: - - "" - resources: - - events - verbs: - - get - - list - - watch - - update - - patch -- apiGroups: - - "" - resources: - - nodes - verbs: - - get - - list - - watch -- apiGroups: - - "" - resources: - - pods - verbs: - - get - - list - - watch -- apiGroups: - - storage.k8s.io - resources: - - storageclasses - verbs: - - get - - list - - watch -- apiGroups: - - storage.k8s.io - resources: - - csinodes - verbs: - - get - - list - - watch -- apiGroups: - - storage.k8s.io - resources: - - volumeattachments - verbs: - - get - - create - - update - - patch - - delete - - list - - watch -- apiGroups: - - storage.k8s.io - resources: - - volumeattachments/status - verbs: - - patch -- apiGroups: - - snapshot.storage.k8s.io - resources: - - volumesnapshots - verbs: - - get - - list - - watch - - update - - patch -- apiGroups: - - snapshot.storage.k8s.io - resources: - - volumesnapshots/status - verbs: - - update - - patch -- apiGroups: - - snapshot.storage.k8s.io - resources: - - volumesnapshotcontents - verbs: - - get - - create - - update - - patch - - delete - - list - - watch -- apiGroups: - - snapshot.storage.k8s.io - resources: - - volumesnapshotcontents/status - verbs: - - update - - patch -- apiGroups: - - snapshot.storage.k8s.io - resources: - - volumesnapshotclasses - verbs: - - get - - list - - watch -- apiGroups: - - coordination.k8s.io - resources: - - leases - verbs: - - get - - create - - update - - patch - - delete - - list - - watch diff --git a/infrastructure/hydra/truenas-csi/controller-deployment.yaml b/infrastructure/hydra/truenas-csi/controller-deployment.yaml deleted file mode 100644 index e9d58f7..0000000 --- a/infrastructure/hydra/truenas-csi/controller-deployment.yaml +++ /dev/null @@ -1,153 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: truenas-csi-controller - name: truenas-csi-controller - namespace: truenas-csi -spec: - selector: - matchLabels: - app: truenas-csi-controller - strategy: {} - template: - metadata: - labels: - app: truenas-csi-controller - spec: - containers: - - args: - - --endpoint=$(CSI_ENDPOINT) - - --node-id=$(NODE_ID) - - --mode=controller - - --v=4 - env: - - name: CSI_ENDPOINT - value: unix:///csi/csi.sock - - name: TRUENAS_API_KEY - valueFrom: - secretKeyRef: - key: api-key - name: truenas-csi-api-credentials - - name: NODE_ID - valueFrom: - fieldRef: - fieldPath: spec.nodeName - - name: TRUENAS_DEFAULT_POOL - valueFrom: - configMapKeyRef: - key: defaultPool - name: truenas-csi - - name: TRUENAS_INSECURE_SKIP_VERIFY - valueFrom: - configMapKeyRef: - key: truenasInsecure - name: truenas-csi - - name: TRUENAS_ISCSI_IQN_BASE - valueFrom: - configMapKeyRef: - key: iscsiIQNBase - name: truenas-csi - - name: TRUENAS_ISCSI_PORTAL - valueFrom: - configMapKeyRef: - key: iscsiPortal - name: truenas-csi - - name: TRUENAS_NFS_SERVER - valueFrom: - configMapKeyRef: - key: nfsServer - name: truenas-csi - - name: TRUENAS_URL - valueFrom: - configMapKeyRef: - key: truenasURL - name: truenas-csi - image: ghcr.io/truenas/truenas-csi:latest - imagePullPolicy: IfNotPresent - livenessProbe: - failureThreshold: 5 - httpGet: - path: /healthz - port: 9808 - initialDelaySeconds: 10 - periodSeconds: 10 - timeoutSeconds: 3 - name: csi-controller - resources: {} - volumeMounts: - - mountPath: /csi - name: socket-dir - - args: - - --csi-address=$(ADDRESS) - - --v=5 - - --feature-gates=Topology=true - - --extra-create-metadata - - --leader-election=true - - --default-fstype=ext4 - - --timeout=60s - env: - - name: ADDRESS - value: /csi/csi.sock - image: registry.k8s.io/sig-storage/csi-provisioner:v6.1.1 - name: csi-provisioner - resources: {} - volumeMounts: - - mountPath: /csi - name: socket-dir - - args: - - --csi-address=$(ADDRESS) - - --v=5 - - --leader-election=true - - --timeout=60s - env: - - name: ADDRESS - value: /csi/csi.sock - image: registry.k8s.io/sig-storage/csi-attacher:v4.11.0 - name: csi-attacher - resources: {} - volumeMounts: - - mountPath: /csi - name: socket-dir - - args: - - --csi-address=$(ADDRESS) - - --v=5 - - --leader-election=true - - --timeout=60s - env: - - name: ADDRESS - value: /csi/csi.sock - image: registry.k8s.io/sig-storage/csi-snapshotter:v8.5.0 - name: csi-snapshotter - resources: {} - volumeMounts: - - mountPath: /csi - name: socket-dir - - args: - - --csi-address=$(ADDRESS) - - --v=5 - - --leader-election=true - - --timeout=60s - env: - - name: ADDRESS - value: /csi/csi.sock - image: registry.k8s.io/sig-storage/csi-resizer:v2.1.0 - name: csi-resizer - resources: {} - volumeMounts: - - mountPath: /csi - name: socket-dir - - args: - - --csi-address=/csi/csi.sock - - --health-port=9808 - image: registry.k8s.io/sig-storage/livenessprobe:v2.18.0 - name: liveness-probe - resources: {} - volumeMounts: - - mountPath: /csi - name: socket-dir - serviceAccountName: truenas-csi-controller-sa - volumes: - - emptyDir: {} - name: socket-dir -status: {} diff --git a/infrastructure/hydra/truenas-csi/controller-service-account.yaml b/infrastructure/hydra/truenas-csi/controller-service-account.yaml deleted file mode 100644 index 61786f1..0000000 --- a/infrastructure/hydra/truenas-csi/controller-service-account.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: truenas-csi-controller-sa - namespace: truenas-csi diff --git a/infrastructure/hydra/truenas-csi/iscsi-storage-class.yaml b/infrastructure/hydra/truenas-csi/iscsi-storage-class.yaml deleted file mode 100644 index 7d85937..0000000 --- a/infrastructure/hydra/truenas-csi/iscsi-storage-class.yaml +++ /dev/null @@ -1,13 +0,0 @@ -allowVolumeExpansion: true -apiVersion: storage.k8s.io/v1 -kind: StorageClass -metadata: - name: truenas-iscsi -parameters: - compression: LZ4 - iscsi.blocksize: "4096" - protocol: iscsi - volblocksize: 16K -provisioner: cis.truenas.io -reclaimPolicy: Delete -volumeBindingMode: Immediate diff --git a/infrastructure/hydra/truenas-csi/kustomization.yaml b/infrastructure/hydra/truenas-csi/kustomization.yaml deleted file mode 100644 index 55ba1dd..0000000 --- a/infrastructure/hydra/truenas-csi/kustomization.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -metadata: - name: truenas-csi - namespace: truenas-csi -resources: -- node-deamonset.yaml -- CSIDriver.yaml -- config.yaml -- iscsi-storage-class.yaml -- namespace.yaml -- controller-service-account.yaml -- controller-cluster-role.yaml -- controller-binding.yaml -- node-service-account.yaml -- node-cluster-role.yaml -- node-binding.yaml -- nfs-storage-class.yaml -- controller-deployment.yaml diff --git a/infrastructure/hydra/truenas-csi/namespace.yaml b/infrastructure/hydra/truenas-csi/namespace.yaml deleted file mode 100644 index 761a8fb..0000000 --- a/infrastructure/hydra/truenas-csi/namespace.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - name: truenas-csi -spec: {} -status: {} diff --git a/infrastructure/hydra/truenas-csi/nfs-storage-class.yaml b/infrastructure/hydra/truenas-csi/nfs-storage-class.yaml deleted file mode 100644 index ea82931..0000000 --- a/infrastructure/hydra/truenas-csi/nfs-storage-class.yaml +++ /dev/null @@ -1,11 +0,0 @@ -allowVolumeExpansion: true -apiVersion: storage.k8s.io/v1 -kind: StorageClass -metadata: - name: truenas-nfs -parameters: - compression: LZ4 - protocol: nfs -provisioner: cis.truenas.io -reclaimPolicy: Retain -volumeBindingMode: Immediate diff --git a/infrastructure/hydra/truenas-csi/node-binding.yaml b/infrastructure/hydra/truenas-csi/node-binding.yaml deleted file mode 100644 index 32c2835..0000000 --- a/infrastructure/hydra/truenas-csi/node-binding.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: truenas-csi-node-role-binding -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: truenas-csi-node-role -subjects: -- kind: ServiceAccount - name: truenas-csi-node-sa - namespace: truenas-csi diff --git a/infrastructure/hydra/truenas-csi/node-cluster-role.yaml b/infrastructure/hydra/truenas-csi/node-cluster-role.yaml deleted file mode 100644 index 101bc58..0000000 --- a/infrastructure/hydra/truenas-csi/node-cluster-role.yaml +++ /dev/null @@ -1,27 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: truenas-csi-node-role -rules: -- apiGroups: - - "" - resources: - - nodes - verbs: - - get -- apiGroups: - - "" - resources: - - pods - verbs: - - get - - list - - watch -- apiGroups: - - storage.k8s.io - resources: - - volumeattachments - verbs: - - get - - list - - watch diff --git a/infrastructure/hydra/truenas-csi/node-deamonset.yaml b/infrastructure/hydra/truenas-csi/node-deamonset.yaml deleted file mode 100644 index 7d2fcc4..0000000 --- a/infrastructure/hydra/truenas-csi/node-deamonset.yaml +++ /dev/null @@ -1,171 +0,0 @@ -apiVersion: apps/v1 -kind: DaemonSet -metadata: - labels: - app: truenas-csi-node - name: truenas-csi-node - namespace: truenas-csi -spec: - selector: - matchLabels: - app: truenas-csi-node - template: - metadata: - labels: - app: truenas-csi-node - spec: - containers: - - args: - - --endpoint=$(CSI_ENDPOINT) - - --node-id=$(NODE_ID) - - --mode=node - - --v=4 - env: - - name: CSI_ENDPOINT - value: unix:///csi/csi.sock - - name: TRUENAS_API_KEY - valueFrom: - secretKeyRef: - key: api-key - name: truenas-csi-api-credentials - - name: NODE_ID - valueFrom: - fieldRef: - fieldPath: spec.nodeName - - name: TRUENAS_DEFAULT_POOL - valueFrom: - configMapKeyRef: - key: defaultPool - name: truenas-csi - - name: TRUENAS_INSECURE_SKIP_VERIFY - valueFrom: - configMapKeyRef: - key: truenasInsecure - name: truenas-csi - - name: TRUENAS_ISCSI_IQN_BASE - valueFrom: - configMapKeyRef: - key: iscsiIQNBase - name: truenas-csi - - name: TRUENAS_ISCSI_PORTAL - valueFrom: - configMapKeyRef: - key: iscsiPortal - name: truenas-csi - - name: TRUENAS_NFS_SERVER - valueFrom: - configMapKeyRef: - key: nfsServer - name: truenas-csi - - name: TRUENAS_URL - valueFrom: - configMapKeyRef: - key: truenasURL - name: truenas-csi - image: ghcr.io/truenas/truenas-csi:latest - imagePullPolicy: IfNotPresent - lifecycle: - postStart: - exec: - command: - - /bin/sh - - -c - - mkdir -p /run/lock/iscsi && mv /usr/sbin/iscsiadm /usr/sbin/iscsiadm.orig - 2>/dev/null; printf '#!/bin/sh\nnsenter --mount=/host/proc/1/ns/mnt - -- /usr/sbin/iscsiadm "$@"\n' > /usr/sbin/iscsiadm && chmod +x /usr/sbin/iscsiadm - livenessProbe: - failureThreshold: 5 - httpGet: - path: /healthz - port: 9808 - initialDelaySeconds: 10 - periodSeconds: 10 - timeoutSeconds: 3 - name: csi-node - resources: {} - securityContext: - privileged: true - volumeMounts: - - mountPath: /csi - name: plugin-dir - - mountPath: /var/lib/kubelet - name: kubelet-dir - - mountPath: /dev - name: device-dir - - mountPath: /etc/iscsi - mountPropagation: Bidirectional - name: iscsi-dir - - mountPath: /var/lib/iscsi - mountPropagation: Bidirectional - name: iscsi-lib - - mountPath: /host - mountPropagation: Bidirectional - name: host-root - - args: - - --csi-address=$(ADDRESS) - - --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH) - - --v=5 - env: - - name: ADDRESS - value: /csi/csi.sock - - name: DRIVER_REG_SOCK_PATH - value: /var/lib/kubelet/plugins/csi.truenas.io/csi.sock - image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.16.0 - name: csi-node-driver-registrar - resources: {} - volumeMounts: - - mountPath: /csi - name: plugin-dir - - mountPath: /registration - name: registration-dir - - args: - - --csi-address=/csi/csi.sock - - --health-port=9808 - image: registry.k8s.io/sig-storage/livenessprobe:v2.18.0 - name: liveness-probe - resources: {} - volumeMounts: - - mountPath: /csi - name: plugin-dir - dnsPolicy: ClusterFirstWithHostNet - hostIPC: true - hostNetwork: true - hostPID: true - priorityClassName: system-node-critical - serviceAccountName: truenas-csi-node-sa - tolerations: - - operator: Exists - volumes: - - hostPath: - path: /var/lib/kubelet/plugins_registry/ - type: DirectoryOrCreate - name: registration-dir - - hostPath: - path: /var/lib/kubelet/plugins/csi.truenas.io/ - type: DirectoryOrCreate - name: plugin-dir - - hostPath: - path: /var/lib/kubelet - type: Directory - name: kubelet-dir - - hostPath: - path: /dev - name: device-dir - - hostPath: - path: /etc/iscsi - type: Directory - name: iscsi-dir - - hostPath: - path: /var/lib/iscsi - type: DirectoryOrCreate - name: iscsi-lib - - hostPath: - path: / - type: Directory - name: host-root - updateStrategy: {} -status: - currentNumberScheduled: 0 - desiredNumberScheduled: 0 - numberMisscheduled: 0 - numberReady: 0 diff --git a/infrastructure/hydra/truenas-csi/node-service-account.yaml b/infrastructure/hydra/truenas-csi/node-service-account.yaml deleted file mode 100644 index edfb197..0000000 --- a/infrastructure/hydra/truenas-csi/node-service-account.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: truenas-csi-node-sa - namespace: truenas-csi