Skip to content

Commit

Permalink
Max volume size
Browse files Browse the repository at this point in the history
  • Loading branch information
robjmorrissey committed Feb 17, 2023
1 parent e2f461e commit 187acca
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/utils/zod/ignite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ export const deploymentMetaDataSchema = z.object({

const UNIX_DIR_REGEX = /^\/([a-zA-Z0-9_\-]+\/)*([a-zA-Z0-9_\-]+)$/g;

const MIN_VOLUME_SIZE_BYTES = 1073741824; // 1gb
const MIN_VOLUME_SIZE_BYTES = 1024 * 1024 * 1024;
const MAX_VOLUME_SIZE_BYTES = 500 * 1024 * 1024 * 1024;

const MIN_RAM_SIZE_BYTES = 134217728;

export const volumeFormatSchema = z.nativeEnum(VolumeFormat);
Expand All @@ -39,7 +41,7 @@ export const volumeSchema = z
try {
const size = parseSize(v);

return size >= MIN_VOLUME_SIZE_BYTES;
return size >= MIN_VOLUME_SIZE_BYTES && size <= MAX_VOLUME_SIZE_BYTES;
} catch (err) {
return false;
}
Expand Down

1 comment on commit 187acca

@vercel
Copy link

@vercel vercel bot commented on 187acca Feb 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

hop-js – ./

hop-js-onehop.vercel.app
hop-js-git-master-onehop.vercel.app
hop-js.vercel.app
js.hop.io

Please sign in to comment.