UNPKG

kubernetes-models

Version:
46 lines (45 loc) 1.33 kB
import { register } from "@kubernetes-models/validate"; import { addSchema as IoK8sApiCoreV1NodeAffinity } from "./IoK8sApiCoreV1NodeAffinity.mjs"; import { addSchema as IoK8sApiCoreV1PodAffinity } from "./IoK8sApiCoreV1PodAffinity.mjs"; import { addSchema as IoK8sApiCoreV1PodAntiAffinity } from "./IoK8sApiCoreV1PodAntiAffinity.mjs"; const schema = { "properties": { "nodeAffinity": { "oneOf": [ { "$ref": "io.k8s.api.core.v1.NodeAffinity#" }, { "type": "null" } ] }, "podAffinity": { "oneOf": [ { "$ref": "io.k8s.api.core.v1.PodAffinity#" }, { "type": "null" } ] }, "podAntiAffinity": { "oneOf": [ { "$ref": "io.k8s.api.core.v1.PodAntiAffinity#" }, { "type": "null" } ] } }, "type": "object" }; export function addSchema() { IoK8sApiCoreV1NodeAffinity(); IoK8sApiCoreV1PodAffinity(); IoK8sApiCoreV1PodAntiAffinity(); register("io.k8s.api.core.v1.Affinity", schema); }