pub struct PodSecurityContext {
pub fs_group: Option<i64>,
pub fs_group_change_policy: Option<String>,
pub run_as_group: Option<i64>,
pub run_as_non_root: Option<bool>,
pub run_as_user: Option<i64>,
pub se_linux_options: Option<SeLinuxOptions>,
pub seccomp_profile: Option<SeccompProfile>,
pub supplemental_groups: Option<Vec<i64>>,
pub sysctls: Option<Vec<Sysctl>>,
pub windows_options: Option<WindowsSecurityContextOptions>,
}Expand description
Some fields are also present in container.securityContext. Field values of container.securityContext take precedence over field values of PodSecurityContext.
Fields§
§fs_group: Option<i64>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: 1. 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–– If 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. +optional
fs_group_change_policy: Option<String>PodFSGroupChangePolicy holds policies that will be used for applying fsGroup to a volume when volume is mounted. +enum
run_as_group: Option<i64>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. +optional
run_as_non_root: Option<bool>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. +optional
run_as_user: Option<i64>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. +optional
se_linux_options: Option<SeLinuxOptions>§seccomp_profile: Option<SeccompProfile>§supplemental_groups: Option<Vec<i64>>A list of groups applied to the first process run in each container, in addition to the container’s primary GID. If unspecified, no groups will be added to any container. Note that this field cannot be set when spec.os.name is windows. +optional
sysctls: Option<Vec<Sysctl>>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. +optional
windows_options: Option<WindowsSecurityContextOptions>Implementations§
Source§impl PodSecurityContext
impl PodSecurityContext
pub fn new() -> PodSecurityContext
Trait Implementations§
Source§impl Clone for PodSecurityContext
impl Clone for PodSecurityContext
Source§fn clone(&self) -> PodSecurityContext
fn clone(&self) -> PodSecurityContext
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PodSecurityContext
impl Debug for PodSecurityContext
Source§impl<'de> Deserialize<'de> for PodSecurityContext
impl<'de> Deserialize<'de> for PodSecurityContext
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl FromStr for PodSecurityContext
Converts Query Parameters representation (style=form, explode=false) to a PodSecurityContext value
as specified in https://swagger.io/docs/specification/serialization/
Should be implemented in a serde deserializer
impl FromStr for PodSecurityContext
Converts Query Parameters representation (style=form, explode=false) to a PodSecurityContext value as specified in https://swagger.io/docs/specification/serialization/ Should be implemented in a serde deserializer
Source§impl PartialEq for PodSecurityContext
impl PartialEq for PodSecurityContext
Source§impl Serialize for PodSecurityContext
impl Serialize for PodSecurityContext
Source§impl ToString for PodSecurityContext
Converts the PodSecurityContext value to the Query Parameters representation (style=form, explode=false)
specified in https://swagger.io/docs/specification/serialization/
Should be implemented in a serde serializer
impl ToString for PodSecurityContext
Converts the PodSecurityContext value to the Query Parameters representation (style=form, explode=false) specified in https://swagger.io/docs/specification/serialization/ Should be implemented in a serde serializer