Create a Helm Chart Configuration File for VAST Block CSI Driver

Prev Next

The VAST Block CSI Driver's Helm chart configuration file lets you override default installation settings provided in the chart with parameters that are specific to your environment.

The configuration file is a YAML file typically named values.yaml, although you can use any arbitrary name for it.

Create a Configuration File

Create a YAML file as follows (see also the example below):

Note

For a detailed reference for parameters and values, refer to https://github.com/vast-data/vast-csi/blob/v2.6/charts/vastblock/values.yaml.

secretName: "<secret>"
verifySsl: true|false
sslCertsSecretName: "<SSL secret>"

StorageClassDefaults:
  <option 1>
  <option 2>
  ...
  <option n>

storageClasses:
  <storage class name 1>:
    <option 1>
    <option 2>
    ...
    <option n>
  <storage class name 2>:
    <option 1>
    <option 2>
    ...
    <option n>
 ...
  <storage class name n>:
    <option 1>
    <option 2>
    ...
    <option n>

In the YAML file:

  1. Set global or storage class-specific session options:

    • Global session options are specified in the beginning of the configuration file. They apply to all storage classes:

      • secretName: "<secret>" (required): Specify the Kubernetes secret that VAST Block CSI Driver will use to communicate with the VAST cluster. For more information, see Create a Kubernetes Secret for VAST Block CSI Driver.

        The secretName global session option is required unless the secret name is provided, together with secretNamespace, under StorageClassDefaults or under a specific storage class.

      • verifySsl: true|false (optional): Specify true to enable SSL encryption for the connection to the VAST cluster. If set to false or not specified, SSL encryption is disabled.

        Tip

        When enabling SSL encryption, either upload a CA-signed SSL certificate to the VAST cluster, or supply a self-signed SSL certificate to the driver. The latter can be done either via the sslCertsSecretName option, or using --set-file sslCert  on the Helm chart installation command.

      • sslCertsSecretName: "<SSL secret>" (optional): Specify the Kubernetes secret that contains the self-signed SSL certificate to be used to secure communications between VAST Block CSI Driver and the VAST cluster. For more information, see Configuring SSL Encryption for VAST Block CSI Driver.

      • blockHostsAutoPrune: true|false (optional):  If set to true, VAST Block CSI Driver automatically deletes auto-generated VAST host entries (NQNs that were automatically created by the driver) when they are no longer in use by any PVCs on the corresponding Kubernetes node. If set to false (default), unused host entries keep accumulating and need to be deleted manually.

        Notice

        This parameter is available starting with VAST Block CSI Driver 2.6.4.

    • Storage class-specific session options are specified under a certain storage class (in step 2). They apply to that particular storage class only, taking precedence over global session options.

  2. Set storage class options:

    • <storage class name> (required): Provide a name to identify the storage class. For more information about Kubernetes storage classes, see Creating Block Storage Classes.

      Note

      Define at least one storage class.

    • <option 1>...<option n>: Specify parameters to be used when provisioning storage for PVCs with this storage class. For information on each option, see  Storage Class Option Reference.

      The required options for block storage provisioning are as follows:

      storageClasses:
        <storage class name>:
          vipPoolFQDN: "<pool FQDN>" | vipPool: "<pool name>"
          subsystem: "<NVMe subsystem>"
      

      If you want to configure storage class-specific session options, add the following parameters:

      • secretName (required if no global session options are set): The name of the Kubernetes secret that contains information about the VAST cluster on which to provision volumes for this particular storage class, the corresponding VMS user credentials or authentication token and, optionally, the SSL certificate. For more information, see Provisioning Block Volumes on Multiple VAST Clusters.

      • secretNamespace (optional): If the storage class Kubernetes secret (specified on secretName) was created in a namespace that is different from that used to install the driver's Helm chart, add this parameter to specify the namespace of the Kubernetes secret.

  3. (Optional) Configure registration of VAST Block CSI Driver driver with kubelet:

    • kubeletPath: "<your kubelet root directory>" (optional): Add this option if you are going to run VAST CSI Block CSI Driver on a Kubernetes cluster where the kubelet root directory is not /var/lib/kubelet.

The following snippet shows a sample configuration file for VAST Block CSI Driver:

secretName: "vast-mgmt"
verifySsl: true

storageClasses:
  vastdata-filesystem:
    vipPool: "vippool-1"
    subsystem: "mysubsystem"

Verify the Configuration File

Verify the newly created chart configuration file:

helm template <release name> <repo>/<chart> -f <filename>.yaml -n <namespace>

Where:

  • <release name> identifies the release being deployed.

  • <repo> is the name of the driver's Helm repository.

  • <chart> is the name of the driver's Helm chart (vastblock).

  • <filename>.yaml is the driver's Helm chart configuration file.

  • <namespace> determines the Kubernetes namespace to which the release is deployed. If this parameter is not specified, the default namespace is used. Otherwise, create a custom namespace prior to installing the driver's Helm chart.

For example:

helm template csi-driver vastblock/vastblock -f values.yaml

The output is similar to the following:

---
# Source: vastcsi/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
  name: csi-vast-controller-sa
  namespace: "default"
  labels:
    helm.sh/chart: vastblock-0.1.0
    app.kubernetes.io/name: vastblock
    app.kubernetes.io/instance: csi-driver
    app.kubernetes.io/version: "2.6.1"
    app.kubernetes.io/managed-by: Helm
---
# Source: vastcsi/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
<...>