Files
cloud-host/frontend/src/lib/storage-utils.ts
T
keyhan 695e05f948 Add managed databases and services with billing-aligned upgrades.
Introduce product types for managed PostgreSQL, Redis, and RabbitMQ with a dedicated dashboard, Helm-only deploy pipeline, external access, snapshots with progress, and prorated resource or storage upgrades matching application billing rules. PVCs use an expandable StorageClass with automatic migration when legacy disks cannot resize in place.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-23 19:00:09 +03:30

7 lines
227 B
TypeScript

/** Kubernetes-style Gi (1024³ bytes), aligned with wizard “GB” fields */
export const ONE_GIB = 1024 ** 3;
export function minGiToFitFileBytes(bytes: number): number {
return Math.max(1, Math.ceil(bytes / ONE_GIB));
}