UNPKG

kubernetes-models

Version:
88 lines (87 loc) 2.54 kB
import { register } from "@kubernetes-models/validate"; import { addSchema as IoK8sApiCoreV1Capabilities } from "./IoK8sApiCoreV1Capabilities.mjs"; import { addSchema as IoK8sApiCoreV1SELinuxOptions } from "./IoK8sApiCoreV1SELinuxOptions.mjs"; import { addSchema as IoK8sApiCoreV1SeccompProfile } from "./IoK8sApiCoreV1SeccompProfile.mjs"; import { addSchema as IoK8sApiCoreV1WindowsSecurityContextOptions } from "./IoK8sApiCoreV1WindowsSecurityContextOptions.mjs"; const schema = { "properties": { "allowPrivilegeEscalation": { "type": "boolean", "nullable": true }, "capabilities": { "oneOf": [ { "$ref": "io.k8s.api.core.v1.Capabilities#" }, { "type": "null" } ] }, "privileged": { "type": "boolean", "nullable": true }, "procMount": { "type": "string", "nullable": true }, "readOnlyRootFilesystem": { "type": "boolean", "nullable": true }, "runAsGroup": { "format": "int64", "type": "integer", "nullable": true }, "runAsNonRoot": { "type": "boolean", "nullable": true }, "runAsUser": { "format": "int64", "type": "integer", "nullable": true }, "seLinuxOptions": { "oneOf": [ { "$ref": "io.k8s.api.core.v1.SELinuxOptions#" }, { "type": "null" } ] }, "seccompProfile": { "oneOf": [ { "$ref": "io.k8s.api.core.v1.SeccompProfile#" }, { "type": "null" } ] }, "windowsOptions": { "oneOf": [ { "$ref": "io.k8s.api.core.v1.WindowsSecurityContextOptions#" }, { "type": "null" } ] } }, "type": "object" }; export function addSchema() { IoK8sApiCoreV1Capabilities(); IoK8sApiCoreV1SELinuxOptions(); IoK8sApiCoreV1SeccompProfile(); IoK8sApiCoreV1WindowsSecurityContextOptions(); register("io.k8s.api.core.v1.SecurityContext", schema); }