Workload Examples Deployment Using Helm

The Helm Chart eases the deployment of the provided workload examples that use the lb-csi-plugin as a persistent storage backend.

We provide some workload deployment examples that use lb-csi-plugin for storage provisioning.

To ease the deployment of these workloads and to make them easily customizable, we provide a Helm Chart as part of the lb-csi-bundle-<version>.tar.gz.

This Helm Chart is comprised of six sub-charts. Each sub-chart defines a set of manifests representing a workload.

All sub-charts are dependent on the StorageClass chart. All of the following PVCs created by the other charts will use the StorageClass we created using the StorageClass Chart. Hence, we should first install this chart and uninstall only after we have uninstalled all other charts.

Workload examples include:

  • StorageClass
  • Block
  • Filesystem
  • Pre-provisioned volume
  • Snapshots and Clones
  • StatefulSet

Helm Chart Content

Bash
Copy

Chart Values

Workload examples are configurable using the lb-csi-workload-examples/values.yaml file.

All workloads are disabled by default, and can be enabled by the <workload_name>.enabled property.

All examples share the same StorageClass and Secret templates.

To override values in these templates, you can:

  • Modify fields in the values.yaml file.
  • Use the --set flag on the helm install command.

Example provided values.yaml file:

YAML
Copy

Values Description:

NameDescriptionDefaultRequired
storageclass.enableDeploy Secret, StorageClassfalsefalse
block.enableDeploy block volume workloadfalsefalse
block.nodeSelectorDeploy POD on specific node using node selectors{}false
block.nodeNameDeploy POD on specific node using node name""false
filesystem.enableDeploy filesystem volume workloadfalsefalse
filesystem.nodeSelectorDeploy POD on specific node using node selectors{}false
filesystem.nodeNameDeploy POD on specific node using node name""false
statefulset.enableDeploy statefulset workloadfalsefalse
preprovisioned.enableDeploy preprovisioned volume workloadfalsefalse
preprovisioned.lightosVolNguidNGUID of LightOS volume""true
preprovisioned.volumeModeSpecifies if this volume is used for Block or Filesystem""true
preprovisioned.storageSize of the volume this PV will point to""true
snaps.enableDeploy snapshot workloadsfalsefalse
snaps.pvcNameName of the PVC for snapshot exampleexample-pvcfalse
snaps.stageName of the snapshot stage we want to execute""false
global.storageClass.mgmtEndpointsLightbits API endpoint list; ex: <ip>:<port>,...<ip>:<port>""true
global.storageClass.projectNameCreated resources will be scoped to this projectdefaultfalse
global.storageClass.replicaCountNumber of replicas for each volume3false
global.storageClass.compressionWhether compressions are in enabled/disableddisabledfalse
global.jwtSecret.nameSecret name that holds Lightbits API JWTexample-secrettrue
global.jwtSecret.namespaceNamespace the secret is defined atdefaulttrue
global.jwtSecret.jwtJWT to authenticate against Lightbits APIdefaulttrue
global.storageClass.qosPolicyNameqos policy name; should exist in Lightbits prior to volume creation""false
global.storageClass.hostEncryptionWhether host-side encryption is enabled/disableddisabledfalse

Mandatory Values To Modify

The following values MUST be modified to match the target Kubernetes cluster.

Lightbits Cluster API Endpoints (mgmt-endpoint ):

Before we deploy a workload, we need to fetch some information from the Lightbits cluster.

lb-csi-plugin needs to be informed about Lightbits management API endpoints.

These endpoints are passed as a comma-delimited string in StorageClass.Parameters.mgmt-endpoints.

Set the MGMT_EP environment variable, by fetching mgmtEndpoints from lbcli - by running the following command:

Bash
Copy

When passing the '' value in the join command to Helm, we must use the escape character \.

Lightbits API JWT:

Each API call to Lightbits requires a JWT for authentication and authorization.

The JWT is passed to the plugin by creating a Kubernetes Secret resource.

Set the LIGHTOS_JWT environment variable, by fetching mgmtEndpoints from lbcli - by running the following command:

Bash
Copy

Kubernetes stores the secret data base64 encoded, but the chart will do the encoding for you.

Installing in a Different Namespace

You can install the workloads in a different namespace (ex: lb-csi-ns), by creating a namespace yourself or by using the shortcut to let Helm create a namespace for you:

Bash
Copy

Rendering Manifests Using the Helm Chart

Render manifests to file /tmp/filesystem-workload.yaml by running the following command:

Bash
Copy

The chart enables rendering multiple workloads at the same time using the following command:

Bash
Copy

The outcome is placed at /tmp/block-and-filesystem-workload.yaml.

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard