UNPKG

@soft-stech/autoscaler

Version:
98 lines (97 loc) 4.15 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.IVerticalPodAutoscalerCheckpointSchema = void 0; // Generated by ts-to-zod const zod_1 = require("zod"); const ObjectMeta_schema_1 = require("@soft-stech/apimachinery/apis/meta/v1/ObjectMeta.schema"); /** * VerticalPodAutoscalerCheckpoint is the checkpoint of the internal state of VPA that is used for recovery after recommender's restart. */ exports.IVerticalPodAutoscalerCheckpointSchema = zod_1.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": zod_1.z.literal("autoscaling.k8s.io/v1"), /** * 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": zod_1.z.literal("VerticalPodAutoscalerCheckpoint"), "metadata": ObjectMeta_schema_1.iObjectMetaSchema.optional(), /** * Specification of the checkpoint. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. */ "spec": zod_1.z.object({ /** * Name of the checkpointed container. */ "containerName": zod_1.z.string().optional(), /** * Name of the VPA object that stored VerticalPodAutoscalerCheckpoint object. */ "vpaObjectName": zod_1.z.string().optional() }).optional(), /** * Data of the checkpoint. */ "status": zod_1.z.object({ /** * Checkpoint of histogram for consumption of CPU. */ "cpuHistogram": zod_1.z.object({ /** * Map from bucket index to bucket weight. */ "bucketWeights": zod_1.z.object({}).optional(), /** * Reference timestamp for samples collected within this histogram. * @format date-time */ "referenceTimestamp": zod_1.z.string().datetime().optional().nullable(), /** * Sum of samples to be used as denominator for weights from BucketWeights. */ "totalWeight": zod_1.z.number().optional() }).optional(), /** * Timestamp of the fist sample from the histograms. * @format date-time */ "firstSampleStart": zod_1.z.string().datetime().optional().nullable(), /** * Timestamp of the last sample from the histograms. * @format date-time */ "lastSampleStart": zod_1.z.string().datetime().optional().nullable(), /** * The time when the status was last refreshed. * @format date-time */ "lastUpdateTime": zod_1.z.string().datetime().optional().nullable(), /** * Checkpoint of histogram for consumption of memory. */ "memoryHistogram": zod_1.z.object({ /** * Map from bucket index to bucket weight. */ "bucketWeights": zod_1.z.object({}).optional(), /** * Reference timestamp for samples collected within this histogram. * @format date-time */ "referenceTimestamp": zod_1.z.string().datetime().optional().nullable(), /** * Sum of samples to be used as denominator for weights from BucketWeights. */ "totalWeight": zod_1.z.number().optional() }).optional(), /** * Total number of samples in the histograms. */ "totalSamplesCount": zod_1.z.number().optional(), /** * Version of the format of the stored data. */ "version": zod_1.z.string().optional() }).optional() });