kubernetes-models
Version:
49 lines (48 loc) • 1.64 kB
JavaScript
import { register } from "@kubernetes-models/validate";
import { addSchema as IoK8sApiAutoscalingV2HorizontalPodAutoscalerBehavior } from "./IoK8sApiAutoscalingV2HorizontalPodAutoscalerBehavior.mjs";
import { addSchema as IoK8sApiAutoscalingV2MetricSpec } from "./IoK8sApiAutoscalingV2MetricSpec.mjs";
import { addSchema as IoK8sApiAutoscalingV2CrossVersionObjectReference } from "./IoK8sApiAutoscalingV2CrossVersionObjectReference.mjs";
const schema = {
"properties": {
"behavior": {
"oneOf": [
{
"$ref": "io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerBehavior#"
},
{
"type": "null"
}
]
},
"maxReplicas": {
"format": "int32",
"type": "integer"
},
"metrics": {
"items": {
"$ref": "io.k8s.api.autoscaling.v2.MetricSpec#"
},
"type": "array",
"nullable": true
},
"minReplicas": {
"format": "int32",
"type": "integer",
"nullable": true
},
"scaleTargetRef": {
"$ref": "io.k8s.api.autoscaling.v2.CrossVersionObjectReference#"
}
},
"required": [
"scaleTargetRef",
"maxReplicas"
],
"type": "object"
};
export function addSchema() {
IoK8sApiAutoscalingV2HorizontalPodAutoscalerBehavior();
IoK8sApiAutoscalingV2MetricSpec();
IoK8sApiAutoscalingV2CrossVersionObjectReference();
register("io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerSpec", schema);
}