kubernetes-models
Version:
129 lines (128 loc) • 3.36 kB
JavaScript
import { register } from "@kubernetes-models/validate";
import { addSchema as IoK8sApiCoreV1ServicePort } from "./IoK8sApiCoreV1ServicePort.mjs";
import { addSchema as IoK8sApiCoreV1SessionAffinityConfig } from "./IoK8sApiCoreV1SessionAffinityConfig.mjs";
const schema = {
"properties": {
"allocateLoadBalancerNodePorts": {
"type": "boolean",
"nullable": true
},
"clusterIP": {
"type": "string",
"nullable": true
},
"clusterIPs": {
"items": {
"type": "string"
},
"type": "array",
"nullable": true
},
"externalIPs": {
"items": {
"type": "string"
},
"type": "array",
"nullable": true
},
"externalName": {
"type": "string",
"nullable": true
},
"externalTrafficPolicy": {
"enum": [
"Cluster",
"Local"
],
"type": "string",
"nullable": true
},
"healthCheckNodePort": {
"format": "int32",
"type": "integer",
"nullable": true
},
"internalTrafficPolicy": {
"type": "string",
"nullable": true
},
"ipFamilies": {
"items": {
"type": "string"
},
"type": "array",
"nullable": true
},
"ipFamilyPolicy": {
"type": "string",
"nullable": true
},
"loadBalancerClass": {
"type": "string",
"nullable": true
},
"loadBalancerIP": {
"type": "string",
"nullable": true
},
"loadBalancerSourceRanges": {
"items": {
"type": "string"
},
"type": "array",
"nullable": true
},
"ports": {
"items": {
"$ref": "io.k8s.api.core.v1.ServicePort#"
},
"type": "array",
"nullable": true
},
"publishNotReadyAddresses": {
"type": "boolean",
"nullable": true
},
"selector": {
"additionalProperties": {
"type": "string"
},
"type": "object",
"nullable": true
},
"sessionAffinity": {
"enum": [
"ClientIP",
"None"
],
"type": "string",
"nullable": true
},
"sessionAffinityConfig": {
"oneOf": [
{
"$ref": "io.k8s.api.core.v1.SessionAffinityConfig#"
},
{
"type": "null"
}
]
},
"type": {
"enum": [
"ClusterIP",
"ExternalName",
"LoadBalancer",
"NodePort"
],
"type": "string",
"nullable": true
}
},
"type": "object"
};
export function addSchema() {
IoK8sApiCoreV1ServicePort();
IoK8sApiCoreV1SessionAffinityConfig();
register("io.k8s.api.core.v1.ServiceSpec", schema);
}