feat: cleanup dangling volumes and folders on startup and on schedule

This commit is contained in:
Nicolas Meienberger
2025-10-17 23:01:47 +02:00
parent 8a9d5fc3c8
commit 8fcc9ada74
13 changed files with 414 additions and 17 deletions

View File

@@ -43,9 +43,17 @@ export const driverController = new Hono()
Err: "",
});
})
.post("/VolumeDriver.Path", (c) => {
.post("/VolumeDriver.Path", async (c) => {
const body = await c.req.json();
if (!body.Name) {
return c.json({ Err: "Volume name is required" }, 400);
}
const { volume } = await volumeService.getVolume(body.Name.replace(/^im-/, ""));
return c.json({
Mountpoint: `/mnt/something`,
Mountpoint: `${VOLUME_MOUNT_BASE}/${volume.name}/_data`,
});
})
.post("/VolumeDriver.Get", async (c) => {