Run the view creation script create-views.py as part of migrating your environment from VAST CSI Driver 2.2.0 to VAST CSI Driver 2.2.1 and later.
Note
Running this script is an optional step during the upgrade.
Starting with version 2.2, VAST CSI Driver automatically creates a VAST Cluster view for each volume it provisions. A view policy is assigned to control access to automatically created views.
The view creation script creates a view for each PVC provisioned with pre-2.2.1 versions of the VAST CSI Driver and assigns a user-supplied view policy to such views. All quotas which were previously under the same root export view, get their own views pointing to the same location, with no impact on the data being stored. This ensures that the PVCs remain accessible in case the root export view is manually deleted.
To run the view creation script:
Download the script from the VAST GitHub space:
wget https://raw.githubusercontent.com/vast-data/vast-csi/v2.2/scripts/create-views.py
Run the script on a host where
kubectlis already installed and configured with the target Kubernetes cluster.Use the following syntax:
create-views.py --view-policy <view policy>
Where
<view policy>specifies an existing VAST Cluster view policy to be assigned to the automatically created views.For example:
>> python3 create-views.py --view-policy mypolicy
Verify that the script completes successfully.