In addition to dynamically creating VAST views for each PVC, VAST CSI Driver can expose existing data as statically provisioned persistent volumes.
You can control whether VAST CSI Driver automatically creates a view and/or a quota for static volumes by leveraging the following options:
static_pv_create_views, when set toyes, instructs VAST CSI Driver to create a view for the static volume in case no such view exists. If this option is omitted or set tono, VAST CSI Driver assumes that there is a predefined view on the VAST cluster that can be used for this volume.static_pv_create_quotas, when set toyes, instructs VAST CSI Driver to create a quota for the static volume if no quota exists. If this option is omitted or set tono, no quota is created.
These options are specified under volumeAttributes in the csi part of the PV definition YAML. You can enter true or 1 instead of yes as the option value.
Note that VAST CSI Driver does not automatically delete views or quotas it has created, even upon deletion of their respective PVs.
Below is an example of a YAML definition for a statically provisioned persistent volume:
apiVersion: v1
kind: PersistentVolume
metadata:
name: csi-pv-static
spec:
storageClassName: vastdata-filesystem
capacity:
storage: 1Gi
accessModes:
- ReadWriteOnce
mountOptions:
- nfsvers=3
csi:
driver: csi.vastdata.com
volumeAttributes:
vip_pool_name: vippool-1
view_policy: default
size: 1G
static_pv_create_views: "yes"
static_pv_create_quotas: "yes"
controllerPublishSecretRef:
name: vast-mgmt
namespace: default
volumeHandle: /full/path/to/view
The PVC for a static volume is similar to the following:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: csi-pvc-static
spec:
storageClassName: vastdata-filesystem
volumeName: csi-pv-static
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi