mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-08 06:15:40 +00:00
Modify the StorageClass install and delete code.
* Only install and uninstall SC and VSC once for default cluster. * Install and uninstall SC and VSC for standby cluster on migration case. * Refactor the StorageClass and VolumeSnapshotClass YAMLs. * Prettify the e2e_suite_test.go Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
This commit is contained in:
12
test/testdata/storage-class/README.md
vendored
Normal file
12
test/testdata/storage-class/README.md
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
The `test/testdata/storage-class` directory contains the StorageClass YAMLs used for E2E.
|
||||
The public cloud provider (including AWS, Azure and GCP) has two StorageClasses.
|
||||
* The `provider-name`.yaml contains the default StorageClass for the provider. It uses the CSI provisioner.
|
||||
* The `provider-name`-legacy.yaml contains the legacy StorageClass for the provider. It uses the in-tree volume plugin as the provisioner. By far, there is no E2E case using them.
|
||||
|
||||
The vSphere environment also has two StorageClass files.
|
||||
* The vsphere-legacy.yaml is used for the TKGm environment.
|
||||
* The vsphere.yaml is used for the VKS environment.
|
||||
|
||||
The ZFS StorageClasses only have the default one. There is no in-tree volume plugin used StorageClass used in E2E.
|
||||
|
||||
The kind StorageClass uses the local-path provisioner. Will consider adding the CSI provisioner when there is a need.
|
||||
@@ -1,8 +1,8 @@
|
||||
apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
metadata:
|
||||
name: e2e-csi-storage-class
|
||||
provisioner: ebs.csi.aws.com
|
||||
name: e2e-storage-class
|
||||
provisioner: kubernetes.io/aws-ebs
|
||||
parameters:
|
||||
type: gp2
|
||||
reclaimPolicy: Delete
|
||||
2
test/testdata/storage-class/aws.yaml
vendored
2
test/testdata/storage-class/aws.yaml
vendored
@@ -2,7 +2,7 @@ apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
metadata:
|
||||
name: e2e-storage-class
|
||||
provisioner: kubernetes.io/aws-ebs
|
||||
provisioner: ebs.csi.aws.com
|
||||
parameters:
|
||||
type: gp2
|
||||
reclaimPolicy: Delete
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
metadata:
|
||||
name: e2e-csi-storage-class
|
||||
provisioner: disk.csi.azure.com
|
||||
name: e2e-storage-class
|
||||
provisioner: kubernetes.io/azure-disk
|
||||
parameters:
|
||||
cachingmode: ReadOnly
|
||||
kind: Managed
|
||||
2
test/testdata/storage-class/azure.yaml
vendored
2
test/testdata/storage-class/azure.yaml
vendored
@@ -2,7 +2,7 @@ apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
metadata:
|
||||
name: e2e-storage-class
|
||||
provisioner: kubernetes.io/azure-disk
|
||||
provisioner: disk.csi.azure.com
|
||||
parameters:
|
||||
cachingmode: ReadOnly
|
||||
kind: Managed
|
||||
|
||||
@@ -4,10 +4,10 @@ kind: StorageClass
|
||||
metadata:
|
||||
labels:
|
||||
addonmanager.kubernetes.io/mode: EnsureExists
|
||||
name: e2e-csi-storage-class
|
||||
name: e2e-storage-class
|
||||
parameters:
|
||||
type: pd-standard
|
||||
provisioner: pd.csi.storage.gke.io
|
||||
provisioner: kubernetes.io/gce-pd
|
||||
reclaimPolicy: Delete
|
||||
volumeBindingMode: WaitForFirstConsumer
|
||||
|
||||
2
test/testdata/storage-class/gcp.yaml
vendored
2
test/testdata/storage-class/gcp.yaml
vendored
@@ -7,7 +7,7 @@ metadata:
|
||||
name: e2e-storage-class
|
||||
parameters:
|
||||
type: pd-standard
|
||||
provisioner: kubernetes.io/gce-pd
|
||||
provisioner: pd.csi.storage.gke.io
|
||||
reclaimPolicy: Delete
|
||||
volumeBindingMode: WaitForFirstConsumer
|
||||
|
||||
|
||||
13
test/testdata/storage-class/vanilla-zfs-csi.yaml
vendored
13
test/testdata/storage-class/vanilla-zfs-csi.yaml
vendored
@@ -1,13 +0,0 @@
|
||||
apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
metadata:
|
||||
name: e2e-csi-storage-class
|
||||
parameters:
|
||||
recordsize: "128k"
|
||||
compression: "off"
|
||||
dedup: "off"
|
||||
fstype: "zfs"
|
||||
poolname: "zfspv-pool"
|
||||
provisioner: zfs.csi.openebs.io
|
||||
volumeBindingMode: WaitForFirstConsumer
|
||||
reclaimPolicy: Retain
|
||||
2
test/testdata/storage-class/vanilla-zfs.yaml
vendored
2
test/testdata/storage-class/vanilla-zfs.yaml
vendored
@@ -9,4 +9,4 @@ parameters:
|
||||
fstype: "zfs"
|
||||
poolname: "zfspv-pool"
|
||||
provisioner: zfs.csi.openebs.io
|
||||
volumeBindingMode: WaitForFirstConsumer
|
||||
volumeBindingMode: WaitForFirstConsumer
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
metadata:
|
||||
name: e2e-csi-storage-class
|
||||
name: e2e-storage-class
|
||||
annotations:
|
||||
storageclass.kubernetes.io/is-default-class: "false"
|
||||
parameters:
|
||||
# StoragePolicyName: "vSAN Default Storage Policy" # This is used for the TKGm environment.
|
||||
svStorageClass: worker-storagepolicy # This is used for TKGs/uTKG environment.
|
||||
StoragePolicyName: "vSAN Default Storage Policy" # This is used for TKGm environment.
|
||||
provisioner: csi.vsphere.vmware.com
|
||||
reclaimPolicy: Delete
|
||||
volumeBindingMode: WaitForFirstConsumer
|
||||
3
test/testdata/storage-class/vsphere.yaml
vendored
3
test/testdata/storage-class/vsphere.yaml
vendored
@@ -5,8 +5,7 @@ metadata:
|
||||
annotations:
|
||||
storageclass.kubernetes.io/is-default-class: "false"
|
||||
parameters:
|
||||
#StoragePolicyName: "vSAN Default Storage Policy" # This is used for TKGm environment.
|
||||
svStorageClass: worker-storagepolicy # This is used for TKGs/uTKG environment.
|
||||
svStorageClass: worker-storagepolicy
|
||||
provisioner: csi.vsphere.vmware.com
|
||||
reclaimPolicy: Delete
|
||||
volumeBindingMode: WaitForFirstConsumer
|
||||
@@ -1,7 +1,7 @@
|
||||
kind: VolumeSnapshotClass
|
||||
apiVersion: snapshot.storage.k8s.io/v1
|
||||
metadata:
|
||||
name: zfspv-snapclass
|
||||
name: e2e-volume-snapshot-class
|
||||
annotations:
|
||||
snapshot.storage.kubernetes.io/is-default-class: "true"
|
||||
labels:
|
||||
|
||||
@@ -8,6 +8,6 @@ metadata:
|
||||
snapshot.storage.kubernetes.io/is-default-class: "true"
|
||||
labels:
|
||||
velero.io/csi-volumesnapshot-class: "true"
|
||||
name: volumesnapshotclass-delete
|
||||
name: e2e-volume-snapshot-class
|
||||
parameters:
|
||||
svVolumeSnapshotClass: volumesnapshotclass-delete
|
||||
|
||||
Reference in New Issue
Block a user