kubernetes-models
Version:
76 lines (75 loc) • 2.57 kB
JavaScript
import { register } from "@kubernetes-models/validate";
import { addSchema as IoK8sApiAutoscalingV2beta1ContainerResourceMetricSource } from "./IoK8sApiAutoscalingV2beta1ContainerResourceMetricSource.mjs";
import { addSchema as IoK8sApiAutoscalingV2beta1ExternalMetricSource } from "./IoK8sApiAutoscalingV2beta1ExternalMetricSource.mjs";
import { addSchema as IoK8sApiAutoscalingV2beta1ObjectMetricSource } from "./IoK8sApiAutoscalingV2beta1ObjectMetricSource.mjs";
import { addSchema as IoK8sApiAutoscalingV2beta1PodsMetricSource } from "./IoK8sApiAutoscalingV2beta1PodsMetricSource.mjs";
import { addSchema as IoK8sApiAutoscalingV2beta1ResourceMetricSource } from "./IoK8sApiAutoscalingV2beta1ResourceMetricSource.mjs";
const schema = {
"properties": {
"containerResource": {
"oneOf": [
{
"$ref": "io.k8s.api.autoscaling.v2beta1.ContainerResourceMetricSource#"
},
{
"type": "null"
}
]
},
"external": {
"oneOf": [
{
"$ref": "io.k8s.api.autoscaling.v2beta1.ExternalMetricSource#"
},
{
"type": "null"
}
]
},
"object": {
"oneOf": [
{
"$ref": "io.k8s.api.autoscaling.v2beta1.ObjectMetricSource#"
},
{
"type": "null"
}
]
},
"pods": {
"oneOf": [
{
"$ref": "io.k8s.api.autoscaling.v2beta1.PodsMetricSource#"
},
{
"type": "null"
}
]
},
"resource": {
"oneOf": [
{
"$ref": "io.k8s.api.autoscaling.v2beta1.ResourceMetricSource#"
},
{
"type": "null"
}
]
},
"type": {
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
};
export function addSchema() {
IoK8sApiAutoscalingV2beta1ContainerResourceMetricSource();
IoK8sApiAutoscalingV2beta1ExternalMetricSource();
IoK8sApiAutoscalingV2beta1ObjectMetricSource();
IoK8sApiAutoscalingV2beta1PodsMetricSource();
IoK8sApiAutoscalingV2beta1ResourceMetricSource();
register("io.k8s.api.autoscaling.v2beta1.MetricSpec", schema);
}