0
0
Fork 0
mirror of https://github.com/renovatebot/renovate.git synced 2025-01-11 13:48:55 +00:00
renovatebot_renovate/lib/modules/manager/glasskube/schema.ts
Jakob Steiner 0d20f17078
feat(manager): add glasskube manager (#30774)
Signed-off-by: Jakob Steiner <jakob.steiner@glasskube.eu>
Co-authored-by: Sebastian Poxhofer <secustor@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2024-08-20 20:03:24 +00:00

31 lines
906 B
TypeScript

import { z } from 'zod';
export const Package = z.object({
apiVersion: z.string().startsWith('packages.glasskube.dev/'),
kind: z.literal('Package').or(z.literal('ClusterPackage')),
spec: z.object({
packageInfo: z.object({
name: z.string(),
version: z.string(),
repositoryName: z.string().optional(),
}),
}),
});
export const PackageRepository = z.object({
apiVersion: z.string().startsWith('packages.glasskube.dev/'),
kind: z.literal('PackageRepository'),
metadata: z.object({
name: z.string(),
annotations: z.record(z.string(), z.string()).optional(),
}),
spec: z.object({
url: z.string(),
}),
});
export const GlasskubeResource = Package.or(PackageRepository);
export type Package = z.infer<typeof Package>;
export type PackageRepository = z.infer<typeof PackageRepository>;
export type GlasskubeResource = z.infer<typeof GlasskubeResource>;