@soft-stech/autoscaler
Version:
Kubernetes Autoscaler models
93 lines (92 loc) • 2.96 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.VerticalPodAutoscaler = 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 = "poc.autoscaling.k8s.io.v1alpha1.VerticalPodAutoscaler";
const schema = {
"type": "object",
"properties": {
"spec": {
"type": "object",
"required": [
"selector"
],
"properties": {
"selector": {
"type": "object",
"properties": {}
},
"updatePolicy": {
"type": "object",
"properties": {
"updateMode": {
"type": "string",
"nullable": true
}
},
"nullable": true
},
"resourcePolicy": {
"type": "object",
"properties": {
"containerPolicies": {
"type": "array",
"items": {
"type": "object",
"properties": {}
},
"nullable": true
}
},
"nullable": true
}
},
"nullable": true
},
"apiVersion": {
"type": "string",
"enum": [
"poc.autoscaling.k8s.io/v1alpha1"
]
},
"kind": {
"type": "string",
"enum": [
"VerticalPodAutoscaler"
]
},
"metadata": {
"oneOf": [
{
"$ref": "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta#"
},
{
"type": "null"
}
]
}
},
"required": [
"apiVersion",
"kind"
]
};
class VerticalPodAutoscaler extends base_1.Model {
constructor(data) {
super({
apiVersion: VerticalPodAutoscaler.apiVersion,
kind: VerticalPodAutoscaler.kind,
...data
});
}
}
exports.VerticalPodAutoscaler = VerticalPodAutoscaler;
VerticalPodAutoscaler.apiVersion = "poc.autoscaling.k8s.io/v1alpha1";
VerticalPodAutoscaler.kind = "VerticalPodAutoscaler";
VerticalPodAutoscaler.is = (0, base_1.createTypeMetaGuard)(VerticalPodAutoscaler);
(0, base_1.setSchema)(VerticalPodAutoscaler, schemaId, () => {
(0, IoK8sApimachineryPkgApisMetaV1ObjectMeta_1.addSchema)();
(0, validate_1.register)(schemaId, schema);
});