{
  "description": "SecurityContext holds security configuration that will be applied to a container. Some fields are present in both SecurityContext and PodSecurityContext.  When both are set, the values in SecurityContext take precedence.",
  "properties": {
    "allowPrivilegeEscalation": {
      "description": "AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN Note that this field cannot be set when spec.os.name is windows.",
      "type": [
        "boolean",
        "null"
      ]
    },
    "appArmorProfile": {
      "description": "AppArmorProfile defines a pod or container's AppArmor settings.",
      "properties": {
        "localhostProfile": {
          "description": "localhostProfile indicates a profile loaded on the node that should be used. The profile must be preconfigured on the node to work. Must match the loaded name of the profile. Must be set if and only if type is \"Localhost\".",
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "description": "type indicates which kind of AppArmor profile will be applied. Valid options are:\n  Localhost - a profile pre-loaded on the node.\n  RuntimeDefault - the container runtime's default profile.\n  Unconfined - no AppArmor enforcement.",
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "type": [
        "object",
        "null"
      ],
      "x-kubernetes-unions": [
        {
          "discriminator": "type",
          "fields-to-discriminateBy": {
            "localhostProfile": "LocalhostProfile"
          }
        }
      ],
      "additionalProperties": false
    },
    "capabilities": {
      "description": "Adds and removes POSIX capabilities from running containers.",
      "properties": {
        "add": {
          "description": "Added capabilities",
          "items": {
            "type": [
              "string",
              "null"
            ]
          },
          "type": [
            "array",
            "null"
          ],
          "x-kubernetes-list-type": "atomic"
        },
        "drop": {
          "description": "Removed capabilities",
          "items": {
            "type": [
              "string",
              "null"
            ]
          },
          "type": [
            "array",
            "null"
          ],
          "x-kubernetes-list-type": "atomic"
        }
      },
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": false
    },
    "privileged": {
      "description": "Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. Note that this field cannot be set when spec.os.name is windows.",
      "type": [
        "boolean",
        "null"
      ]
    },
    "procMount": {
      "description": "procMount denotes the type of proc mount to use for the containers. The default value is Default which uses the container runtime defaults for readonly paths and masked paths. This requires the ProcMountType feature flag to be enabled. Note that this field cannot be set when spec.os.name is windows.",
      "type": [
        "string",
        "null"
      ]
    },
    "readOnlyRootFilesystem": {
      "description": "Whether this container has a read-only root filesystem. Default is false. Note that this field cannot be set when spec.os.name is windows.",
      "type": [
        "boolean",
        "null"
      ]
    },
    "runAsGroup": {
      "description": "The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in PodSecurityContext.  If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.",
      "format": "int64",
      "type": [
        "integer",
        "null"
      ]
    },
    "runAsNonRoot": {
      "description": "Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext.  If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.",
      "type": [
        "boolean",
        "null"
      ]
    },
    "runAsUser": {
      "description": "The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext.  If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.",
      "format": "int64",
      "type": [
        "integer",
        "null"
      ]
    },
    "seLinuxOptions": {
      "description": "SELinuxOptions are the labels to be applied to the container",
      "properties": {
        "level": {
          "description": "Level is SELinux level label that applies to the container.",
          "type": [
            "string",
            "null"
          ]
        },
        "role": {
          "description": "Role is a SELinux role label that applies to the container.",
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "description": "Type is a SELinux type label that applies to the container.",
          "type": [
            "string",
            "null"
          ]
        },
        "user": {
          "description": "User is a SELinux user label that applies to the container.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": false
    },
    "seccompProfile": {
      "description": "SeccompProfile defines a pod/container's seccomp profile settings. Only one profile source may be set.",
      "properties": {
        "localhostProfile": {
          "description": "localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must be set if type is \"Localhost\". Must NOT be set for any other type.",
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "description": "type indicates which kind of seccomp profile will be applied. Valid options are:\n\nLocalhost - a profile defined in a file on the node should be used. RuntimeDefault - the container runtime default profile should be used. Unconfined - no profile should be applied.",
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "type": [
        "object",
        "null"
      ],
      "x-kubernetes-unions": [
        {
          "discriminator": "type",
          "fields-to-discriminateBy": {
            "localhostProfile": "LocalhostProfile"
          }
        }
      ],
      "additionalProperties": false
    },
    "windowsOptions": {
      "description": "WindowsSecurityContextOptions contain Windows-specific options and credentials.",
      "properties": {
        "gmsaCredentialSpec": {
          "description": "GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field.",
          "type": [
            "string",
            "null"
          ]
        },
        "gmsaCredentialSpecName": {
          "description": "GMSACredentialSpecName is the name of the GMSA credential spec to use.",
          "type": [
            "string",
            "null"
          ]
        },
        "hostProcess": {
          "description": "HostProcess determines if a container should be run as a 'Host Process' container. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true.",
          "type": [
            "boolean",
            "null"
          ]
        },
        "runAsUserName": {
          "description": "The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": false
    }
  },
  "type": "object",
  "additionalProperties": false,
  "$schema": "http://json-schema.org/schema#"
}