priority add for traefik config setup

This commit is contained in:
Owen
2025-10-04 21:29:59 -07:00
committed by Pallavi Kumari
parent ff2bcfb0e7
commit 1e4ca69c89
7 changed files with 67 additions and 29 deletions

View File

@@ -113,8 +113,12 @@ export async function updateProxyResources(
internalPort: internalPortToCreate,
path: targetData.path,
pathMatchType: targetData["path-match"],
<<<<<<< HEAD
rewritePath: targetData.rewritePath,
rewritePathType: targetData["rewrite-match"]
=======
priority: targetData.priority
>>>>>>> b8d96345 (priority add for traefik config setup)
})
.returning();
@@ -362,8 +366,12 @@ export async function updateProxyResources(
enabled: targetData.enabled,
path: targetData.path,
pathMatchType: targetData["path-match"],
<<<<<<< HEAD
rewritePath: targetData.rewritePath,
rewritePathType: targetData["rewrite-match"]
=======
priority: targetData.priority
>>>>>>> b8d96345 (priority add for traefik config setup)
})
.where(eq(targets.targetId, existingTarget.targetId))
.returning();

View File

@@ -33,7 +33,8 @@ export const TargetSchema = z.object({
"path-match": z.enum(["exact", "prefix", "regex"]).optional().nullable(),
healthcheck: TargetHealthCheckSchema.optional(),
rewritePath: z.string().optional(),
"rewrite-match": z.enum(["exact", "prefix", "regex", "stripPrefix"]).optional().nullable()
"rewrite-match": z.enum(["exact", "prefix", "regex", "stripPrefix"]).optional().nullable(),
priority: z.number().int().min(1).max(1000).optional().default(100)
});
export type TargetData = z.infer<typeof TargetSchema>;