SynologyOpenSource / synology-csi

Apache License 2.0
499 stars 107 forks source link

CHAP configuration for iscsi targets #63

Open dnovotny opened 1 year ago

dnovotny commented 1 year ago

Is there documentation on how/where to configure CHAP settings when creating the iscsi targets/luns? Is there a way to store that in a secret and point to it from the storageclass parameter key?

I have the CSI driver setup and working, and it creates the targets and luns as expected, but I don't see where to provide CHAP credentials. If I create the PVC in my k8s cluster, it will create the target and luns, but will fail to connect because my nodes are passing CHAP credentials to the Synology NAS. If I edit the target in DSM, then the lun mounts as expected.

This is a new install, so I am not sure what will happen with scaling up and down yet, but mobility between nodes should be fine.

For references, my cluster is using Ubuntu 22.04LTS on Raspberry Pi 4B Nodes, which are PXE Booting to an iSCSI root off the Synology. So the iscsi configuration on the nodes and the synology are configured and working correctly. And as stated, after the PVCs are deployed and the PVs are created, I can see the LUNs and Targets in the DSM. If I add the CHAP configuration at that point, then the volumes mount and run as expected.

aaron-trout commented 12 months ago

+1 it would be great to have support for iSCSI CHAP auth in this driver

sebracs commented 9 months ago

There seems to be some stub code but no real implementation: https://github.com/SynologyOpenSource/synology-csi/blob/a4270a3a9c793694f58f9284eb117b44f3f51e64/pkg/driver/initiator.go#L32