@soft-stech/fleet
Version:
36 lines (35 loc) • 1.49 kB
JavaScript
import { z } from "zod";
import { iObjectMetaSchema } from "@soft-stech/apimachinery/apis/meta/v1/ObjectMeta.schema";
/**
* Content is used internally by Fleet and should not be used directly. It
* contains the resources from a bundle for a specific target cluster.
*/
export const IContentSchema = 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"),
/**
* Content is a byte array, which contains the manifests of a bundle.
* The bundle resources are copied into the bundledeployment's content
* resource, so the downstream agent can deploy them.
* @format byte
*/
content: z.string().optional(),
/**
* 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("Content"),
metadata: iObjectMetaSchema.optional(),
/**
* SHA256Sum of the Content field
*/
sha256sum: z.string().optional()
});