kubernetes-models
Version:
54 lines (53 loc) • 1.39 kB
JavaScript
import { register } from "@kubernetes-models/validate";
import { addSchema as IoK8sApiBatchV1JobTemplateSpec } from "./IoK8sApiBatchV1JobTemplateSpec.mjs";
const schema = {
"properties": {
"concurrencyPolicy": {
"enum": [
"Allow",
"Forbid",
"Replace"
],
"type": "string",
"nullable": true
},
"failedJobsHistoryLimit": {
"format": "int32",
"type": "integer",
"nullable": true
},
"jobTemplate": {
"$ref": "io.k8s.api.batch.v1.JobTemplateSpec#"
},
"schedule": {
"type": "string"
},
"startingDeadlineSeconds": {
"format": "int64",
"type": "integer",
"nullable": true
},
"successfulJobsHistoryLimit": {
"format": "int32",
"type": "integer",
"nullable": true
},
"suspend": {
"type": "boolean",
"nullable": true
},
"timeZone": {
"type": "string",
"nullable": true
}
},
"required": [
"schedule",
"jobTemplate"
],
"type": "object"
};
export function addSchema() {
IoK8sApiBatchV1JobTemplateSpec();
register("io.k8s.api.batch.v1.CronJobSpec", schema);
}