UNPKG

kubernetes-models

Version:
44 lines (43 loc) 1.43 kB
import { register } from "@kubernetes-models/validate"; import { addSchema as IoK8sApimachineryPkgUtilIntstrIntOrString } from "@kubernetes-models/apimachinery/_schemas/IoK8sApimachineryPkgUtilIntstrIntOrString"; import { addSchema as IoK8sApimachineryPkgApisMetaV1LabelSelector } from "@kubernetes-models/apimachinery/_schemas/IoK8sApimachineryPkgApisMetaV1LabelSelector"; const schema = { "properties": { "maxUnavailable": { "oneOf": [ { "$ref": "io.k8s.apimachinery.pkg.util.intstr.IntOrString#" }, { "type": "null" } ] }, "minAvailable": { "oneOf": [ { "$ref": "io.k8s.apimachinery.pkg.util.intstr.IntOrString#" }, { "type": "null" } ] }, "selector": { "oneOf": [ { "$ref": "io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector#" }, { "type": "null" } ] } }, "type": "object" }; export function addSchema() { IoK8sApimachineryPkgUtilIntstrIntOrString(); IoK8sApimachineryPkgApisMetaV1LabelSelector(); register("io.k8s.api.policy.v1.PodDisruptionBudgetSpec", schema); }