kubernetes-models
Version:
257 lines (256 loc) • 7.64 kB
JavaScript
import { register } from "@kubernetes-models/validate";
import { addSchema as IoK8sApiCoreV1Affinity } from "./IoK8sApiCoreV1Affinity.mjs";
import { addSchema as IoK8sApiCoreV1Container } from "./IoK8sApiCoreV1Container.mjs";
import { addSchema as IoK8sApiCoreV1PodDNSConfig } from "./IoK8sApiCoreV1PodDNSConfig.mjs";
import { addSchema as IoK8sApiCoreV1EphemeralContainer } from "./IoK8sApiCoreV1EphemeralContainer.mjs";
import { addSchema as IoK8sApiCoreV1HostAlias } from "./IoK8sApiCoreV1HostAlias.mjs";
import { addSchema as IoK8sApiCoreV1LocalObjectReference } from "./IoK8sApiCoreV1LocalObjectReference.mjs";
import { addSchema as IoK8sApiCoreV1PodOS } from "./IoK8sApiCoreV1PodOS.mjs";
import { addSchema as IoK8sApimachineryPkgApiResourceQuantity } from "@kubernetes-models/apimachinery/_schemas/IoK8sApimachineryPkgApiResourceQuantity";
import { addSchema as IoK8sApiCoreV1PodReadinessGate } from "./IoK8sApiCoreV1PodReadinessGate.mjs";
import { addSchema as IoK8sApiCoreV1PodSecurityContext } from "./IoK8sApiCoreV1PodSecurityContext.mjs";
import { addSchema as IoK8sApiCoreV1Toleration } from "./IoK8sApiCoreV1Toleration.mjs";
import { addSchema as IoK8sApiCoreV1TopologySpreadConstraint } from "./IoK8sApiCoreV1TopologySpreadConstraint.mjs";
import { addSchema as IoK8sApiCoreV1Volume } from "./IoK8sApiCoreV1Volume.mjs";
const schema = {
"properties": {
"activeDeadlineSeconds": {
"format": "int64",
"type": "integer",
"nullable": true
},
"affinity": {
"oneOf": [
{
"$ref": "io.k8s.api.core.v1.Affinity#"
},
{
"type": "null"
}
]
},
"automountServiceAccountToken": {
"type": "boolean",
"nullable": true
},
"containers": {
"items": {
"$ref": "io.k8s.api.core.v1.Container#"
},
"type": "array"
},
"dnsConfig": {
"oneOf": [
{
"$ref": "io.k8s.api.core.v1.PodDNSConfig#"
},
{
"type": "null"
}
]
},
"dnsPolicy": {
"enum": [
"ClusterFirst",
"ClusterFirstWithHostNet",
"Default",
"None"
],
"type": "string",
"nullable": true
},
"enableServiceLinks": {
"type": "boolean",
"nullable": true
},
"ephemeralContainers": {
"items": {
"$ref": "io.k8s.api.core.v1.EphemeralContainer#"
},
"type": "array",
"nullable": true
},
"hostAliases": {
"items": {
"$ref": "io.k8s.api.core.v1.HostAlias#"
},
"type": "array",
"nullable": true
},
"hostIPC": {
"type": "boolean",
"nullable": true
},
"hostNetwork": {
"type": "boolean",
"nullable": true
},
"hostPID": {
"type": "boolean",
"nullable": true
},
"hostUsers": {
"type": "boolean",
"nullable": true
},
"hostname": {
"type": "string",
"nullable": true
},
"imagePullSecrets": {
"items": {
"$ref": "io.k8s.api.core.v1.LocalObjectReference#"
},
"type": "array",
"nullable": true
},
"initContainers": {
"items": {
"$ref": "io.k8s.api.core.v1.Container#"
},
"type": "array",
"nullable": true
},
"nodeName": {
"type": "string",
"nullable": true
},
"nodeSelector": {
"additionalProperties": {
"type": "string"
},
"type": "object",
"nullable": true
},
"os": {
"oneOf": [
{
"$ref": "io.k8s.api.core.v1.PodOS#"
},
{
"type": "null"
}
]
},
"overhead": {
"additionalProperties": {
"$ref": "io.k8s.apimachinery.pkg.api.resource.Quantity#"
},
"type": "object",
"nullable": true
},
"preemptionPolicy": {
"type": "string",
"nullable": true
},
"priority": {
"format": "int32",
"type": "integer",
"nullable": true
},
"priorityClassName": {
"type": "string",
"nullable": true
},
"readinessGates": {
"items": {
"$ref": "io.k8s.api.core.v1.PodReadinessGate#"
},
"type": "array",
"nullable": true
},
"restartPolicy": {
"enum": [
"Always",
"Never",
"OnFailure"
],
"type": "string",
"nullable": true
},
"runtimeClassName": {
"type": "string",
"nullable": true
},
"schedulerName": {
"type": "string",
"nullable": true
},
"securityContext": {
"oneOf": [
{
"$ref": "io.k8s.api.core.v1.PodSecurityContext#"
},
{
"type": "null"
}
]
},
"serviceAccount": {
"type": "string",
"nullable": true
},
"serviceAccountName": {
"type": "string",
"nullable": true
},
"setHostnameAsFQDN": {
"type": "boolean",
"nullable": true
},
"shareProcessNamespace": {
"type": "boolean",
"nullable": true
},
"subdomain": {
"type": "string",
"nullable": true
},
"terminationGracePeriodSeconds": {
"format": "int64",
"type": "integer",
"nullable": true
},
"tolerations": {
"items": {
"$ref": "io.k8s.api.core.v1.Toleration#"
},
"type": "array",
"nullable": true
},
"topologySpreadConstraints": {
"items": {
"$ref": "io.k8s.api.core.v1.TopologySpreadConstraint#"
},
"type": "array",
"nullable": true
},
"volumes": {
"items": {
"$ref": "io.k8s.api.core.v1.Volume#"
},
"type": "array",
"nullable": true
}
},
"required": [
"containers"
],
"type": "object"
};
export function addSchema() {
IoK8sApiCoreV1Affinity();
IoK8sApiCoreV1Container();
IoK8sApiCoreV1PodDNSConfig();
IoK8sApiCoreV1EphemeralContainer();
IoK8sApiCoreV1HostAlias();
IoK8sApiCoreV1LocalObjectReference();
IoK8sApiCoreV1PodOS();
IoK8sApimachineryPkgApiResourceQuantity();
IoK8sApiCoreV1PodReadinessGate();
IoK8sApiCoreV1PodSecurityContext();
IoK8sApiCoreV1Toleration();
IoK8sApiCoreV1TopologySpreadConstraint();
IoK8sApiCoreV1Volume();
register("io.k8s.api.core.v1.PodSpec", schema);
}