{
  "description": "PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext.  Field values of container.securityContext take precedence over field values of PodSecurityContext.",
  "properties": {
    "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
    },
    "fsGroup": {
      "description": "A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod:\n\n1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw----\n\nIf unset, the Kubelet will not modify the ownership and permissions of any volume. Note that this field cannot be set when spec.os.name is windows.",
      "format": "int64",
      "type": [
        "integer",
        "null"
      ]
    },
    "fsGroupChangePolicy": {
      "description": "fsGroupChangePolicy defines behavior of changing ownership and permission of the volume before being exposed inside Pod. This field will only apply to volume types which support fsGroup based ownership(and permissions). It will have no effect on ephemeral volume types such as: secret, configmaps and emptydir. Valid values are \"OnRootMismatch\" and \"Always\". If not specified, \"Always\" is used. Note that this field cannot be set when spec.os.name is windows.",
      "type": [
        "string",
        "null"
      ]
    },
    "runAsGroup": {
      "description": "The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in SecurityContext.  If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. 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 SecurityContext.  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 SecurityContext.  If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows.",
      "format": "int64",
      "type": [
        "integer",
        "null"
      ]
    },
    "seLinuxChangePolicy": {
      "description": "seLinuxChangePolicy defines how the container's SELinux label is applied to all volumes used by the Pod. It has no effect on nodes that do not support SELinux or to volumes does not support SELinux. Valid values are \"MountOption\" and \"Recursive\".\n\n\"Recursive\" means relabeling of all files on all Pod volumes by the container runtime. This may be slow for large volumes, but allows mixing privileged and unprivileged Pods sharing the same volume on the same node.\n\n\"MountOption\" mounts all eligible Pod volumes with `-o context` mount option. This requires all Pods that share the same volume to use the same SELinux label. It is not possible to share the same volume among privileged and unprivileged Pods. Eligible volumes are in-tree FibreChannel and iSCSI volumes, and all CSI volumes whose CSI driver announces SELinux support by setting spec.seLinuxMount: true in their CSIDriver instance. Other volumes are always re-labelled recursively. \"MountOption\" value is allowed only when SELinuxMount feature gate is enabled.\n\nIf not specified and SELinuxMount feature gate is enabled, \"MountOption\" is used. If not specified and SELinuxMount feature gate is disabled, \"MountOption\" is used for ReadWriteOncePod volumes and \"Recursive\" for all other volumes.\n\nThis field affects only Pods that have SELinux label set, either in PodSecurityContext or in SecurityContext of all containers.\n\nAll Pods that use the same volume should use the same seLinuxChangePolicy, otherwise some pods can get stuck in ContainerCreating state. Note that this field cannot be set when spec.os.name is windows.",
      "type": [
        "string",
        "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
    },
    "supplementalGroups": {
      "description": "A list of groups applied to the first process run in each container, in addition to the container's primary GID and fsGroup (if specified).  If the SupplementalGroupsPolicy feature is enabled, the supplementalGroupsPolicy field determines whether these are in addition to or instead of any group memberships defined in the container image. If unspecified, no additional groups are added, though group memberships defined in the container image may still be used, depending on the supplementalGroupsPolicy field. Note that this field cannot be set when spec.os.name is windows.",
      "items": {
        "format": "int64",
        "type": [
          "integer",
          "null"
        ]
      },
      "type": [
        "array",
        "null"
      ],
      "x-kubernetes-list-type": "atomic"
    },
    "supplementalGroupsPolicy": {
      "description": "Defines how supplemental groups of the first container processes are calculated. Valid values are \"Merge\" and \"Strict\". If not specified, \"Merge\" is used. (Alpha) Using the field requires the SupplementalGroupsPolicy feature gate to be enabled and the container runtime must implement support for this feature. Note that this field cannot be set when spec.os.name is windows.",
      "type": [
        "string",
        "null"
      ]
    },
    "sysctls": {
      "description": "Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. Note that this field cannot be set when spec.os.name is windows.",
      "items": {
        "description": "Sysctl defines a kernel parameter to be set",
        "properties": {
          "name": {
            "description": "Name of a property to set",
            "type": "string"
          },
          "value": {
            "description": "Value of a property to set",
            "type": "string"
          }
        },
        "required": [
          "name",
          "value"
        ],
        "type": [
          "object",
          "null"
        ],
        "additionalProperties": false
      },
      "type": [
        "array",
        "null"
      ],
      "x-kubernetes-list-type": "atomic"
    },
    "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#"
}