refactor(volumes): rework volumes and paths

This commit is contained in:
Mauricio Siu
2024-07-21 18:02:42 -06:00
parent 63a1039439
commit 2e79c7230f
17 changed files with 3151 additions and 127 deletions

View File

@@ -31,6 +31,7 @@ export const mounts = pgTable("mount", {
type: mountType("type").notNull(),
hostPath: text("hostPath"),
volumeName: text("volumeName"),
filePath: text("filePath"),
content: text("content"),
serviceType: serviceType("serviceType").notNull().default("application"),
mountPath: text("mountPath").notNull(),
@@ -97,6 +98,7 @@ const createSchema = createInsertSchema(mounts, {
content: z.string().optional(),
mountPath: z.string().min(1),
mountId: z.string().optional(),
filePath: z.string().optional(),
serviceType: z
.enum([
"application",
@@ -122,6 +124,7 @@ export const apiCreateMount = createSchema
content: true,
mountPath: true,
serviceType: true,
filePath: true,
})
.extend({
serviceId: z.string().min(1),
@@ -155,3 +158,10 @@ export const apiFindMountByApplicationId = createSchema
export const apiUpdateMount = createSchema.partial().extend({
mountId: z.string().min(1),
});
/**
*
Primer Paso:
Cuando utilizamos aplicaciones en el volume mount, seria buena idea agregar un FilePath?
*/