UNPKG

@soft-stech/fleet

Version:
42 lines (41 loc) 1.7 kB
import { z } from "zod"; import { iObjectMetaSchema } from "@soft-stech/apimachinery/apis/meta/v1/ObjectMeta.schema"; /** * ClusterRegistrationToken is used by agents to register a new cluster. */ export const IClusterRegistrationTokenSchema = z.object({ /** * APIVersion defines the versioned schema of this representation of an object. * Servers should convert recognized schemas to the latest internal value, and * may reject unrecognized values. * More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ "apiVersion": z.literal("fleet.cattle.io/v1alpha1"), /** * Kind is a string value representing the REST resource this object represents. * Servers may infer this from the endpoint the client submits requests to. * Cannot be updated. * In CamelCase. * More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */ "kind": z.literal("ClusterRegistrationToken"), "metadata": iObjectMetaSchema.optional(), "spec": z.object({ /** * TTL is the time to live for the token. It is used to calculate the * expiration time. If the token expires, it will be deleted. */ "ttl": z.string().optional() }).optional(), "status": z.object({ /** * Expires is the time when the token expires. * @format date-time */ "expires": z.string().datetime().optional().nullable(), /** * SecretName is the name of the secret containing the token. */ "secretName": z.string().optional() }).optional() });