tep / truenas-csp

TrueNAS CORE Container Storage Provider for HPE CSI Driver for Kubernetes

Home Page:https://scod.hpedev.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TrueNAS Container Storage Provider

The TrueNAS Container Storage Provider (CSP) is an API gateway to provide iSCSI block storage provisioning using the HPE CSI Driver for Kubernetes. It allows you to use TrueNAS and FreeNAS to provide persistent storage using iSCSI to Kubernetes.

CSP API endpoints:

  • tokens
  • hosts
  • volumes
  • snapshots
  • volume_groups (not implemented)
  • snapshot_groups (not implemented)

The CSP specification in an open specification that supports iSCSI and Fibre Channel protocols.

As of version 2.2.0 of the HPE CSI Driver, these parts of the CSI spec are currently implemented:

  • Dynamic Provisioning
  • Raw Block Volume
  • Volume Expansion
  • Data Sources (PersistentVolumeClaims and VolumeSnapshots)
  • Volume Limits
  • Volume Stats
  • Ephemeral Local Volumes (not supported by the TrueNAS CSP, see limitations)

Topology is currently not supported by the HPE CSI Driver.

Releases

Releases will track the upstream versioning of the HPE CSI Driver for Kubernetes and potential bugfixes in the TrueNAS CSP will be pushed to the same image tag matching the HPE CSI Driver version.

Install

See INSTALL.

Building & testing

A Makefile is provided to run the CSP in a local docker container, make sure docker is running and issue:

make all run

The CSP is now listening on localhost:8080

Note: When building and testing the CSP locally it will run with debug logging switched on.

There are a few adhoc tests provided. Make sure you have a TrueNAS/FreeNAS appliance configured with:

  • A pool named "tank"
  • iSCSI portal configured as described in the prerequisites.
make test backend=<IP address of management interface on the TrueNAS appliance> password=<API key>

Note: None of the tests are comprehensive nor provide full coverage and should be considered equivalent to "Does the light come on?".

A Kubernetes e2e test Makefile is provided in e2e for both RWO and RWX modes. Ensure everything is installed and a Secret named "truenas-secret" exists in the "hpe-storage" Namespace. Then run:

cd e2e
make rwo
make rwx
make clean

Note: Not all tests pass at this time.

Limitations

These are the known limitations.

  • Ephemeral Local Volumes: Due to how TrueNAS handles ZVol names internally and the long names generated by the HPE CSI Driver when requesting ephemeral storage, Ephemeral Local Volumes is not compatible with the TrueNAS CSP. Generic Ephemeral Volumes introduced as an Alpha feature in Kubernetes 1.19 works as the volumes are derived from a regular StorageClass.
  • Volume sizing: TrueNAS ZVols "volblocksize" need to be even divisible by the requesting volume size. This is a non-issue if you're working with even "Gi" sizes in the PersistentVolumeClaims. It gets hairy if working with "Mi" sizes and large volume block sizes.

Need help?

Please file an issue. This software is not supported by Hewlett Packard Enterprise. It's a voluntary community effort.

Contributing

Contributing to the TrueNAS CSP is subject to the following contributing guidelines.

Other Container Storage Providers for HPE CSI Driver

There's currently no other open source CSPs, but the official HPE CSI Driver for Kubernetes include:

Similar projects

The TrueNAS CSP is not the only enabler of TrueNAS/FreeNAS for Kubernetes.

License

TrueNAS(R) (C) 2022 iXsystems, Inc.

TrueNAS CORE(R) (C) 2022 iXsystems, Inc.

TrueNAS SCALE(R) (C) 2022 iXsystems, Inc.

FreeNAS(R) is (C) 2011-2022 iXsystems

TrueNAS CSP is released under the MIT License.

(C) Copyright 2022 Hewlett Packard Enterprise Development LP.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

TrueNAS CORE Container Storage Provider for HPE CSI Driver for Kubernetes

https://scod.hpedev.io

License:MIT License


Languages

Language:Python 81.0%Language:Makefile 14.6%Language:Smarty 3.8%Language:Dockerfile 0.6%