You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnfmt.Errorf("seems like you were using %s as a distro before and now have switched to %s, please make sure to not switch between vCluster distros", previousDistro, currentDistro)
348
+
// ValidateStoreChanges checks whether migrating from one store to the other is allowed.
returnfmt.Errorf("seems like you were using %s as a store before and now have switched to %s, please make sure to not switch between vCluster stores", previousStoreType, currentStoreType)
354
+
switchcurrentStoreType {
355
+
caseStoreTypeDeployedEtcd:
356
+
fallthrough
357
+
caseStoreTypeEmbeddedEtcd:
358
+
// switching from external ETCD, deploy ETCD, or embedded (SQLite) to deployed or embedded ETCD is valid
returnfmt.Errorf("seems like you were using %s as a store before and now have switched to %s, please make sure to not switch between vCluster stores", previousStoreType, currentStoreType)
362
+
caseStoreTypeExternalDatabase:
363
+
// switching from embedded to external ETCD is allowed because of a bug that labeled store types as embedded but used
364
+
// external info if provided when the external "enabled" flag was not used. Now, using the "enabled" flag is required or
365
+
// SQLite is used. The exception to allow this switch is necessary so they can toggle the "enabled" flag if the cluster
366
+
// was previously using external. Otherwise, after upgrade the vCluster will start using a fresh SQLite database.
367
+
ifpreviousStoreType==StoreTypeEmbeddedDatabase {
368
+
returnnil
358
369
}
370
+
default:
359
371
}
372
+
returnfmt.Errorf("seems like you were using %s as a store before and now have switched to %s,"+
373
+
" please make sure to not switch between vCluster stores", previousStoreType, currentStoreType)
374
+
}
360
375
376
+
// ValidateDistroChanges checks whether migrating from one distro to the other is allowed.
returnfmt.Errorf("seems like you were using %s as a distro before and now have switched to %s, please make sure to not switch between vCluster distros", previousDistro, currentDistro)
0 commit comments