mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-19 14:34:17 +00:00
Fix missing default storageclass issue
Signed-off-by: danfengl <danfengl@vmware.com>
This commit is contained in:
@@ -54,8 +54,8 @@ func (s *StorageClasssChanging) Init() error {
|
||||
Text: "Change the storage class of persistent volumes and persistent" +
|
||||
" volume claims during restores",
|
||||
}
|
||||
s.srcStorageClass = "default"
|
||||
s.desStorageClass = StorageClassName
|
||||
s.srcStorageClass = StorageClassName
|
||||
s.desStorageClass = StorageClassName2
|
||||
s.labels = map[string]string{"velero.io/change-storage-class": "RestoreItemAction",
|
||||
"velero.io/plugin-config": ""}
|
||||
s.data = map[string]string{s.srcStorageClass: s.desStorageClass}
|
||||
@@ -79,10 +79,11 @@ func (s *StorageClasssChanging) CreateResources() error {
|
||||
"app": "test",
|
||||
}
|
||||
s.Ctx, _ = context.WithTimeout(context.Background(), 10*time.Minute)
|
||||
By(fmt.Sprintf("Create a storage class %s", s.desStorageClass), func() {
|
||||
Expect(InstallStorageClass(s.Ctx, fmt.Sprintf("testdata/storage-class/%s.yaml",
|
||||
s.VeleroCfg.CloudProvider))).To(Succeed())
|
||||
|
||||
By(("Installing storage class..."), func() {
|
||||
Expect(InstallTestStorageClasses(fmt.Sprintf("testdata/storage-class/%s.yaml", s.VeleroCfg.CloudProvider))).To(Succeed(), "Failed to install storage class")
|
||||
})
|
||||
|
||||
By(fmt.Sprintf("Create namespace %s", s.namespace), func() {
|
||||
Expect(CreateNamespace(s.Ctx, s.Client, s.namespace)).To(Succeed(),
|
||||
fmt.Sprintf("Failed to create namespace %s", s.namespace))
|
||||
|
||||
Reference in New Issue
Block a user