UNPKG

@soft-stech/autoscaler

Version:
142 lines (141 loc) 4.88 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.VerticalPodAutoscalerCheckpoint = void 0; const IoK8sApimachineryPkgApisMetaV1ObjectMeta_1 = require("@soft-stech/apimachinery/_schemas/IoK8sApimachineryPkgApisMetaV1ObjectMeta"); const base_1 = require("@soft-stech/base"); const validate_1 = require("@soft-stech/validate"); const schemaId = "autoscaling.k8s.io.v1beta2.VerticalPodAutoscalerCheckpoint"; const schema = { "type": "object", "properties": { "apiVersion": { "type": "string", "enum": [ "autoscaling.k8s.io/v1beta2" ] }, "kind": { "type": "string", "enum": [ "VerticalPodAutoscalerCheckpoint" ] }, "metadata": { "oneOf": [ { "$ref": "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta#" }, { "type": "null" } ] }, "spec": { "properties": { "containerName": { "type": "string", "nullable": true }, "vpaObjectName": { "type": "string", "nullable": true } }, "type": "object", "nullable": true }, "status": { "properties": { "cpuHistogram": { "properties": { "bucketWeights": { "type": "object", "properties": {}, "nullable": true }, "referenceTimestamp": { "format": "date-time", "nullable": true, "type": "string" }, "totalWeight": { "type": "number", "nullable": true } }, "type": "object", "nullable": true }, "firstSampleStart": { "format": "date-time", "nullable": true, "type": "string" }, "lastSampleStart": { "format": "date-time", "nullable": true, "type": "string" }, "lastUpdateTime": { "format": "date-time", "nullable": true, "type": "string" }, "memoryHistogram": { "properties": { "bucketWeights": { "type": "object", "properties": {}, "nullable": true }, "referenceTimestamp": { "format": "date-time", "nullable": true, "type": "string" }, "totalWeight": { "type": "number", "nullable": true } }, "type": "object", "nullable": true }, "totalSamplesCount": { "type": "integer", "nullable": true }, "version": { "type": "string", "nullable": true } }, "type": "object", "nullable": true } }, "required": [ "apiVersion", "kind" ] }; /** * VerticalPodAutoscalerCheckpoint is the checkpoint of the internal state of VPA that is used for recovery after recommender's restart. */ class VerticalPodAutoscalerCheckpoint extends base_1.Model { constructor(data) { super({ apiVersion: VerticalPodAutoscalerCheckpoint.apiVersion, kind: VerticalPodAutoscalerCheckpoint.kind, ...data }); } } exports.VerticalPodAutoscalerCheckpoint = VerticalPodAutoscalerCheckpoint; VerticalPodAutoscalerCheckpoint.apiVersion = "autoscaling.k8s.io/v1beta2"; VerticalPodAutoscalerCheckpoint.kind = "VerticalPodAutoscalerCheckpoint"; VerticalPodAutoscalerCheckpoint.is = (0, base_1.createTypeMetaGuard)(VerticalPodAutoscalerCheckpoint); (0, base_1.setSchema)(VerticalPodAutoscalerCheckpoint, schemaId, () => { (0, IoK8sApimachineryPkgApisMetaV1ObjectMeta_1.addSchema)(); (0, validate_1.register)(schemaId, schema); });