UNPKG

@soft-stech/fleet

Version:
519 lines (518 loc) 19.8 kB
import { z } from "zod"; export declare const IImageScanSchema: z.ZodObject<{ /** * 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.ZodLiteral<"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.ZodLiteral<"ImageScan">; metadata: z.ZodOptional<z.ZodObject<{ annotations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; creationTimestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>; deletionGracePeriodSeconds: z.ZodOptional<z.ZodNumber>; deletionTimestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>; finalizers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; generateName: z.ZodOptional<z.ZodString>; generation: z.ZodOptional<z.ZodNumber>; labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; managedFields: z.ZodOptional<z.ZodArray<z.ZodObject<{ apiVersion: z.ZodOptional<z.ZodString>; fieldsType: z.ZodOptional<z.ZodString>; fieldsV1: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>; manager: z.ZodOptional<z.ZodString>; operation: z.ZodOptional<z.ZodString>; subresource: z.ZodOptional<z.ZodString>; /** * * @format int64 */ time: z.ZodOptional<z.ZodNullable<z.ZodString>>; }, "strip", z.ZodTypeAny, { apiVersion?: string | undefined; fieldsType?: string | undefined; fieldsV1?: {} | undefined; manager?: string | undefined; operation?: string | undefined; subresource?: string | undefined; time?: string | null | undefined; }, { apiVersion?: string | undefined; fieldsType?: string | undefined; fieldsV1?: {} | undefined; manager?: string | undefined; operation?: string | undefined; subresource?: string | undefined; time?: string | null | undefined; }>, "many">>; name: z.ZodOptional<z.ZodString>; namespace: z.ZodOptional<z.ZodString>; ownerReferences: z.ZodOptional<z.ZodArray<z.ZodObject<{ apiVersion: z.ZodString; blockOwnerDeletion: z.ZodOptional<z.ZodBoolean>; controller: z.ZodOptional<z.ZodBoolean>; kind: z.ZodString; name: z.ZodString; uid: z.ZodString; }, "strip", z.ZodTypeAny, { apiVersion: string; kind: string; name: string; uid: string; blockOwnerDeletion?: boolean | undefined; controller?: boolean | undefined; }, { apiVersion: string; kind: string; name: string; uid: string; blockOwnerDeletion?: boolean | undefined; controller?: boolean | undefined; }>, "many">>; resourceVersion: z.ZodOptional<z.ZodString>; selfLink: z.ZodOptional<z.ZodString>; uid: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { name?: string | undefined; uid?: string | undefined; resourceVersion?: string | undefined; selfLink?: string | undefined; annotations?: Record<string, string> | undefined; creationTimestamp?: string | null | undefined; deletionGracePeriodSeconds?: number | undefined; deletionTimestamp?: string | null | undefined; finalizers?: string[] | undefined; generateName?: string | undefined; generation?: number | undefined; labels?: Record<string, string> | undefined; managedFields?: { apiVersion?: string | undefined; fieldsType?: string | undefined; fieldsV1?: {} | undefined; manager?: string | undefined; operation?: string | undefined; subresource?: string | undefined; time?: string | null | undefined; }[] | undefined; namespace?: string | undefined; ownerReferences?: { apiVersion: string; kind: string; name: string; uid: string; blockOwnerDeletion?: boolean | undefined; controller?: boolean | undefined; }[] | undefined; }, { name?: string | undefined; uid?: string | undefined; resourceVersion?: string | undefined; selfLink?: string | undefined; annotations?: Record<string, string> | undefined; creationTimestamp?: string | null | undefined; deletionGracePeriodSeconds?: number | undefined; deletionTimestamp?: string | null | undefined; finalizers?: string[] | undefined; generateName?: string | undefined; generation?: number | undefined; labels?: Record<string, string> | undefined; managedFields?: { apiVersion?: string | undefined; fieldsType?: string | undefined; fieldsV1?: {} | undefined; manager?: string | undefined; operation?: string | undefined; subresource?: string | undefined; time?: string | null | undefined; }[] | undefined; namespace?: string | undefined; ownerReferences?: { apiVersion: string; kind: string; name: string; uid: string; blockOwnerDeletion?: boolean | undefined; controller?: boolean | undefined; }[] | undefined; }>>; /** * API is taken from https://github.com/fluxcd/image-reflector-controller */ spec: z.ZodOptional<z.ZodObject<{ /** * GitRepo reference name */ gitrepoName: z.ZodOptional<z.ZodString>; /** * Image is the name of the image repository */ image: z.ZodOptional<z.ZodString>; /** * Interval is the length of time to wait between * scans of the image repository. */ interval: z.ZodOptional<z.ZodString>; /** * Policy gives the particulars of the policy to be followed in * selecting the most recent image */ policy: z.ZodOptional<z.ZodObject<{ /** * Alphabetical set of rules to use for alphabetical ordering of the tags. */ alphabetical: z.ZodOptional<z.ZodObject<{ /** * Order specifies the sorting order of the tags. Given the letters of the * alphabet as tags, ascending order would select Z, and descending order * would select A. */ order: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { order?: string | undefined; }, { order?: string | undefined; }>>; /** * SemVer gives a semantic version range to check against the tags * available. */ semver: z.ZodOptional<z.ZodObject<{ /** * Range gives a semver range for the image tag; the highest * version within the range that's a tag yields the latest image. */ range: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { range?: string | undefined; }, { range?: string | undefined; }>>; }, "strip", z.ZodTypeAny, { alphabetical?: { order?: string | undefined; } | undefined; semver?: { range?: string | undefined; } | undefined; }, { alphabetical?: { order?: string | undefined; } | undefined; semver?: { range?: string | undefined; } | undefined; }>>; /** * SecretRef can be given the name of a secret containing * credentials to use for the image registry. The secret should be * created with `kubectl create secret docker-registry`, or the * equivalent. */ secretRef: z.ZodOptional<z.ZodObject<{ /** * Name of the referent. * This field is effectively required, but due to backwards compatibility is * allowed to be empty. Instances of this type with an empty value here are * almost certainly wrong. * TODO: Add other useful fields. apiVersion, kind, uid? * More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names * TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896. */ name: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { name?: string | undefined; }, { name?: string | undefined; }>>; /** * This flag tells the controller to suspend subsequent image scans. * It does not apply to already started scans. Defaults to false. */ suspend: z.ZodOptional<z.ZodBoolean>; /** * TagName is the tag ref that needs to be put in manifest to replace fields */ tagName: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { gitrepoName?: string | undefined; image?: string | undefined; interval?: string | undefined; policy?: { alphabetical?: { order?: string | undefined; } | undefined; semver?: { range?: string | undefined; } | undefined; } | undefined; secretRef?: { name?: string | undefined; } | undefined; suspend?: boolean | undefined; tagName?: string | undefined; }, { gitrepoName?: string | undefined; image?: string | undefined; interval?: string | undefined; policy?: { alphabetical?: { order?: string | undefined; } | undefined; semver?: { range?: string | undefined; } | undefined; } | undefined; secretRef?: { name?: string | undefined; } | undefined; suspend?: boolean | undefined; tagName?: string | undefined; }>>; status: z.ZodOptional<z.ZodObject<{ /** * CanonicalName is the name of the image repository with all the * implied bits made explicit; e.g., `docker.io/library/alpine` * rather than `alpine`. */ canonicalImageName: z.ZodOptional<z.ZodString>; conditions: z.ZodOptional<z.ZodArray<z.ZodObject<{ /** * Last time the condition transitioned from one status to another. */ lastTransitionTime: z.ZodOptional<z.ZodString>; /** * The last time this condition was updated. */ lastUpdateTime: z.ZodOptional<z.ZodString>; /** * Human-readable message indicating details about last transition */ message: z.ZodOptional<z.ZodString>; /** * The reason for the condition's last transition. */ reason: z.ZodOptional<z.ZodString>; /** * Status of the condition, one of True, False, Unknown. */ status: z.ZodString; /** * Type of cluster condition. */ type: z.ZodString; }, "strip", z.ZodTypeAny, { type: string; status: string; message?: string | undefined; lastTransitionTime?: string | undefined; lastUpdateTime?: string | undefined; reason?: string | undefined; }, { type: string; status: string; message?: string | undefined; lastTransitionTime?: string | undefined; lastUpdateTime?: string | undefined; reason?: string | undefined; }>, "many">>; /** * LastScanTime is the last time image was scanned * @format date-time */ lastScanTime: z.ZodNullable<z.ZodOptional<z.ZodString>>; /** * LatestDigest is the digest of latest tag */ latestDigest: z.ZodOptional<z.ZodString>; /** * LatestImage gives the first in the list of images scanned by * the image repository, when filtered and ordered according to * the policy. */ latestImage: z.ZodOptional<z.ZodString>; /** * Latest tag is the latest tag filtered by the policy */ latestTag: z.ZodOptional<z.ZodString>; /** * * @format int64 */ observedGeneration: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { conditions?: { type: string; status: string; message?: string | undefined; lastTransitionTime?: string | undefined; lastUpdateTime?: string | undefined; reason?: string | undefined; }[] | undefined; observedGeneration?: number | undefined; canonicalImageName?: string | undefined; lastScanTime?: string | null | undefined; latestDigest?: string | undefined; latestImage?: string | undefined; latestTag?: string | undefined; }, { conditions?: { type: string; status: string; message?: string | undefined; lastTransitionTime?: string | undefined; lastUpdateTime?: string | undefined; reason?: string | undefined; }[] | undefined; observedGeneration?: number | undefined; canonicalImageName?: string | undefined; lastScanTime?: string | null | undefined; latestDigest?: string | undefined; latestImage?: string | undefined; latestTag?: string | undefined; }>>; }, "strip", z.ZodTypeAny, { apiVersion: "fleet.cattle.io/v1alpha1"; kind: "ImageScan"; status?: { conditions?: { type: string; status: string; message?: string | undefined; lastTransitionTime?: string | undefined; lastUpdateTime?: string | undefined; reason?: string | undefined; }[] | undefined; observedGeneration?: number | undefined; canonicalImageName?: string | undefined; lastScanTime?: string | null | undefined; latestDigest?: string | undefined; latestImage?: string | undefined; latestTag?: string | undefined; } | undefined; metadata?: { name?: string | undefined; uid?: string | undefined; resourceVersion?: string | undefined; selfLink?: string | undefined; annotations?: Record<string, string> | undefined; creationTimestamp?: string | null | undefined; deletionGracePeriodSeconds?: number | undefined; deletionTimestamp?: string | null | undefined; finalizers?: string[] | undefined; generateName?: string | undefined; generation?: number | undefined; labels?: Record<string, string> | undefined; managedFields?: { apiVersion?: string | undefined; fieldsType?: string | undefined; fieldsV1?: {} | undefined; manager?: string | undefined; operation?: string | undefined; subresource?: string | undefined; time?: string | null | undefined; }[] | undefined; namespace?: string | undefined; ownerReferences?: { apiVersion: string; kind: string; name: string; uid: string; blockOwnerDeletion?: boolean | undefined; controller?: boolean | undefined; }[] | undefined; } | undefined; spec?: { gitrepoName?: string | undefined; image?: string | undefined; interval?: string | undefined; policy?: { alphabetical?: { order?: string | undefined; } | undefined; semver?: { range?: string | undefined; } | undefined; } | undefined; secretRef?: { name?: string | undefined; } | undefined; suspend?: boolean | undefined; tagName?: string | undefined; } | undefined; }, { apiVersion: "fleet.cattle.io/v1alpha1"; kind: "ImageScan"; status?: { conditions?: { type: string; status: string; message?: string | undefined; lastTransitionTime?: string | undefined; lastUpdateTime?: string | undefined; reason?: string | undefined; }[] | undefined; observedGeneration?: number | undefined; canonicalImageName?: string | undefined; lastScanTime?: string | null | undefined; latestDigest?: string | undefined; latestImage?: string | undefined; latestTag?: string | undefined; } | undefined; metadata?: { name?: string | undefined; uid?: string | undefined; resourceVersion?: string | undefined; selfLink?: string | undefined; annotations?: Record<string, string> | undefined; creationTimestamp?: string | null | undefined; deletionGracePeriodSeconds?: number | undefined; deletionTimestamp?: string | null | undefined; finalizers?: string[] | undefined; generateName?: string | undefined; generation?: number | undefined; labels?: Record<string, string> | undefined; managedFields?: { apiVersion?: string | undefined; fieldsType?: string | undefined; fieldsV1?: {} | undefined; manager?: string | undefined; operation?: string | undefined; subresource?: string | undefined; time?: string | null | undefined; }[] | undefined; namespace?: string | undefined; ownerReferences?: { apiVersion: string; kind: string; name: string; uid: string; blockOwnerDeletion?: boolean | undefined; controller?: boolean | undefined; }[] | undefined; } | undefined; spec?: { gitrepoName?: string | undefined; image?: string | undefined; interval?: string | undefined; policy?: { alphabetical?: { order?: string | undefined; } | undefined; semver?: { range?: string | undefined; } | undefined; } | undefined; secretRef?: { name?: string | undefined; } | undefined; suspend?: boolean | undefined; tagName?: string | undefined; } | undefined; }>;