Remove TrueNAS CSI

This commit is contained in:
Daniel Cosme
2026-05-01 14:47:10 -04:00
parent c52f7bb4eb
commit 8cbc9ab03f
17 changed files with 6 additions and 614 deletions
+1 -1
View File
@@ -4,6 +4,6 @@ metadata:
name: immich name: immich
namespace: immich namespace: immich
resources: resources:
- namespace.yaml
- uploads-pvc.yaml - uploads-pvc.yaml
- deployment.yaml - deployment.yaml
- namespace.yaml
+2 -2
View File
@@ -4,7 +4,7 @@ metadata:
name: linking name: linking
namespace: linkding namespace: linkding
resources: resources:
- namespace.yaml
- srv.yaml
- pvc.yaml - pvc.yaml
- deployment.yaml - deployment.yaml
- namespace.yaml
- srv.yaml
+3 -4
View File
@@ -12,7 +12,6 @@ import (
"danicos.dev/daniel/homelab/pkg/longhorn" "danicos.dev/daniel/homelab/pkg/longhorn"
"danicos.dev/daniel/homelab/pkg/monitoring" "danicos.dev/daniel/homelab/pkg/monitoring"
"danicos.dev/daniel/homelab/pkg/root" "danicos.dev/daniel/homelab/pkg/root"
"danicos.dev/daniel/homelab/pkg/truenas"
/* /*
apps "k8s.io/api/apps/v1" apps "k8s.io/api/apps/v1"
core "k8s.io/api/core/v1" core "k8s.io/api/core/v1"
@@ -25,9 +24,9 @@ func main() {
assertNoErr(err) assertNoErr(err)
hydra_infrastructure := map[string]stack.Stack{ hydra_infrastructure := map[string]stack.Stack{
"monitoring": monitoring.Stack(), "monitoring": monitoring.Stack(),
"longhorn": longhorn.Stack(), "longhorn": longhorn.Stack(),
"truenas-csi": truenas.Stack(), // "truenas-csi": truenas.Stack(),
"cloud-native-pg": cnpg.Stack(), "cloud-native-pg": cnpg.Stack(),
} }
for name, s := range hydra_infrastructure { for name, s := range hydra_infrastructure {
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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: {}
@@ -1,5 +0,0 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: truenas-csi-controller-sa
namespace: truenas-csi
@@ -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
@@ -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
@@ -1,6 +0,0 @@
apiVersion: v1
kind: Namespace
metadata:
name: truenas-csi
spec: {}
status: {}
@@ -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
@@ -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
@@ -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
@@ -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
@@ -1,5 +0,0 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: truenas-csi-node-sa
namespace: truenas-csi