Skip to content

Commit

Permalink
fix redis addon allocated storage (#4533)
Browse files Browse the repository at this point in the history
  • Loading branch information
Feroze Mohideen authored Apr 15, 2024
1 parent 6412530 commit 08d6abb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dashboard/src/lib/databases/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,11 @@ const managedRedisConfigValidator = z.object({
.nonempty("Master password is required")
.default(""),
engineVersion: z.string().default("7.1"),
allocatedStorageGigabytes: z
.number()
.int()
.positive("Allocated storage must be a positive integer")
.default(1),
});

export const dbFormValidator = z.object({
Expand Down
1 change: 1 addition & 0 deletions dashboard/src/lib/hooks/useDatastore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ const clientDbToCreateInput = (values: DbFormData): CreateDatastoreInput => {
name: values.name,
masterUserPassword: values.config.masterUserPassword,
engineVersion: values.config.engineVersion,
allocatedStorage: values.config.allocatedStorageGigabytes,
cpuCores: instanceTypeMatch?.cpuCores ?? 1,
ramMegabytes: instanceTypeMatch?.ramGigabytes
? instanceTypeMatch.ramGigabytes * 1024
Expand Down

0 comments on commit 08d6abb

Please sign in to comment.