hpe-storage / truenas-csp

TrueNAS Container Storage Provider for HPE CSI Driver for Kubernetes
https://scod.hpedev.io
MIT License
65 stars 8 forks source link

Fetch "target_basename" from TrueNAS #35

Closed tep closed 1 year ago

tep commented 1 year ago

This adds an optional override for the Backend field target_basename plus the needed helm updates to plumb in an override value.

Fixes: #34

Signed-off-by: Tim Peoples tim@toolman.org

tep commented 1 year ago

Note: This is the other half of what's needed to resolve hpe-storage/common-host-libs/issues/173

tep commented 1 year ago

This PR now does something completely different.

The configuration override for the target_basename value has been removed.

Instead, since the TrueNAS server already knows its target basename, we now simply pull the proper value from a GET on iscsi/global. If that fails, we fall back to the previous hardcoded value.

This seems much less brittle than keeping configurations in sync (whether as a helm override or a storage class parameter).

datamattsson commented 1 year ago

You can now use any of the two FreeNAS/TrueNAS target names. Thanks for filing this, the solution is now merged in #40