UNPKG

kubernetes-models

Version:
184 lines (183 loc) 5.13 kB
import { register } from "@kubernetes-models/validate"; import { addSchema as IoK8sApiCoreV1EnvVar } from "./IoK8sApiCoreV1EnvVar.mjs"; import { addSchema as IoK8sApiCoreV1EnvFromSource } from "./IoK8sApiCoreV1EnvFromSource.mjs"; import { addSchema as IoK8sApiCoreV1Lifecycle } from "./IoK8sApiCoreV1Lifecycle.mjs"; import { addSchema as IoK8sApiCoreV1Probe } from "./IoK8sApiCoreV1Probe.mjs"; import { addSchema as IoK8sApiCoreV1ContainerPort } from "./IoK8sApiCoreV1ContainerPort.mjs"; import { addSchema as IoK8sApiCoreV1ResourceRequirements } from "./IoK8sApiCoreV1ResourceRequirements.mjs"; import { addSchema as IoK8sApiCoreV1SecurityContext } from "./IoK8sApiCoreV1SecurityContext.mjs"; import { addSchema as IoK8sApiCoreV1VolumeDevice } from "./IoK8sApiCoreV1VolumeDevice.mjs"; import { addSchema as IoK8sApiCoreV1VolumeMount } from "./IoK8sApiCoreV1VolumeMount.mjs"; const schema = { "properties": { "args": { "items": { "type": "string" }, "type": "array", "nullable": true }, "command": { "items": { "type": "string" }, "type": "array", "nullable": true }, "env": { "items": { "$ref": "io.k8s.api.core.v1.EnvVar#" }, "type": "array", "nullable": true }, "envFrom": { "items": { "$ref": "io.k8s.api.core.v1.EnvFromSource#" }, "type": "array", "nullable": true }, "image": { "type": "string", "nullable": true }, "imagePullPolicy": { "enum": [ "Always", "IfNotPresent", "Never" ], "type": "string", "nullable": true }, "lifecycle": { "oneOf": [ { "$ref": "io.k8s.api.core.v1.Lifecycle#" }, { "type": "null" } ] }, "livenessProbe": { "oneOf": [ { "$ref": "io.k8s.api.core.v1.Probe#" }, { "type": "null" } ] }, "name": { "type": "string" }, "ports": { "items": { "$ref": "io.k8s.api.core.v1.ContainerPort#" }, "type": "array", "nullable": true }, "readinessProbe": { "oneOf": [ { "$ref": "io.k8s.api.core.v1.Probe#" }, { "type": "null" } ] }, "resources": { "oneOf": [ { "$ref": "io.k8s.api.core.v1.ResourceRequirements#" }, { "type": "null" } ] }, "securityContext": { "oneOf": [ { "$ref": "io.k8s.api.core.v1.SecurityContext#" }, { "type": "null" } ] }, "startupProbe": { "oneOf": [ { "$ref": "io.k8s.api.core.v1.Probe#" }, { "type": "null" } ] }, "stdin": { "type": "boolean", "nullable": true }, "stdinOnce": { "type": "boolean", "nullable": true }, "terminationMessagePath": { "type": "string", "nullable": true }, "terminationMessagePolicy": { "enum": [ "FallbackToLogsOnError", "File" ], "type": "string", "nullable": true }, "tty": { "type": "boolean", "nullable": true }, "volumeDevices": { "items": { "$ref": "io.k8s.api.core.v1.VolumeDevice#" }, "type": "array", "nullable": true }, "volumeMounts": { "items": { "$ref": "io.k8s.api.core.v1.VolumeMount#" }, "type": "array", "nullable": true }, "workingDir": { "type": "string", "nullable": true } }, "required": [ "name" ], "type": "object" }; export function addSchema() { IoK8sApiCoreV1EnvVar(); IoK8sApiCoreV1EnvFromSource(); IoK8sApiCoreV1Lifecycle(); IoK8sApiCoreV1Probe(); IoK8sApiCoreV1ContainerPort(); IoK8sApiCoreV1ResourceRequirements(); IoK8sApiCoreV1SecurityContext(); IoK8sApiCoreV1VolumeDevice(); IoK8sApiCoreV1VolumeMount(); register("io.k8s.api.core.v1.Container", schema); }