pub struct LinuxSandboxSecurityContext {
pub namespace_options: Option<NamespaceOption>,
pub selinux_options: Option<SeLinuxOption>,
pub run_as_user: Option<Int64Value>,
pub run_as_group: Option<Int64Value>,
pub readonly_rootfs: bool,
pub supplemental_groups: Vec<i64>,
pub supplemental_groups_policy: i32,
pub privileged: bool,
pub seccomp: Option<SecurityProfile>,
pub apparmor: Option<SecurityProfile>,
pub seccomp_profile_path: String,
}Expand description
LinuxSandboxSecurityContext holds linux security configuration that will be applied to a sandbox. Note that:
- It does not apply to containers in the pods.
- It may not be applicable to a PodSandbox which does not contain any running process.
Fields§
§namespace_options: Option<NamespaceOption>Configurations for the sandbox’s namespaces. This will be used only if the PodSandbox uses namespace for isolation.
selinux_options: Option<SeLinuxOption>Optional SELinux context to be applied.
run_as_user: Option<Int64Value>UID to run sandbox processes as, when applicable.
run_as_group: Option<Int64Value>GID to run sandbox processes as, when applicable. run_as_group should only be specified when run_as_user is specified; otherwise, the runtime MUST error.
readonly_rootfs: boolIf set, the root filesystem of the sandbox is read-only.
supplemental_groups: Vec<i64>List of groups applied to the first process run in each container. supplemental_groups_policy can control how groups will be calculated.
supplemental_groups_policy: i32supplemental_groups_policy defines how supplemental groups of the first container processes are calculated. Valid values are “Merge” and “Strict”. If not specified, “Merge” is used.
privileged: boolIndicates whether the sandbox will be asked to run a privileged container. If a privileged container is to be executed within it, this MUST be true. This allows a sandbox to take additional security precautions if no privileged containers are expected to be run.
seccomp: Option<SecurityProfile>Seccomp profile for the sandbox.
apparmor: Option<SecurityProfile>AppArmor profile for the sandbox.
seccomp_profile_path: StringSeccomp profile for the sandbox, candidate values are:
- runtime/default: the default profile for the container runtime
- unconfined: unconfined profile, ie, no seccomp sandboxing
- localhost/
: the profile installed on the node. is the full path of the profile. Default: “”, which is identical with unconfined.
Implementations§
Source§impl LinuxSandboxSecurityContext
impl LinuxSandboxSecurityContext
Sourcepub fn supplemental_groups_policy(&self) -> SupplementalGroupsPolicy
pub fn supplemental_groups_policy(&self) -> SupplementalGroupsPolicy
Returns the enum value of supplemental_groups_policy, or the default if the field is set to an invalid enum value.
Sourcepub fn set_supplemental_groups_policy(
&mut self,
value: SupplementalGroupsPolicy,
)
pub fn set_supplemental_groups_policy( &mut self, value: SupplementalGroupsPolicy, )
Sets supplemental_groups_policy to the provided enum value.
Trait Implementations§
Source§impl Clone for LinuxSandboxSecurityContext
impl Clone for LinuxSandboxSecurityContext
Source§fn clone(&self) -> LinuxSandboxSecurityContext
fn clone(&self) -> LinuxSandboxSecurityContext
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LinuxSandboxSecurityContext
impl Debug for LinuxSandboxSecurityContext
Source§impl Message for LinuxSandboxSecurityContext
impl Message for LinuxSandboxSecurityContext
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl Name for LinuxSandboxSecurityContext
impl Name for LinuxSandboxSecurityContext
Source§const NAME: &'static str = "LinuxSandboxSecurityContext"
const NAME: &'static str = "LinuxSandboxSecurityContext"
Message.
This name is the same as it appears in the source .proto file, e.g. FooBar.Source§const PACKAGE: &'static str = "runtime.v1"
const PACKAGE: &'static str = "runtime.v1"
., e.g. google.protobuf.Source§fn full_name() -> String
fn full_name() -> String
Message.
It’s prefixed with the package name and names of any parent messages,
e.g. google.rpc.BadRequest.FieldViolation.
By default, this is the package name followed by the message name.
Fully-qualified names must be unique within a domain of Type URLs.Source§impl PartialEq for LinuxSandboxSecurityContext
impl PartialEq for LinuxSandboxSecurityContext
Source§fn eq(&self, other: &LinuxSandboxSecurityContext) -> bool
fn eq(&self, other: &LinuxSandboxSecurityContext) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for LinuxSandboxSecurityContext
Auto Trait Implementations§
impl Freeze for LinuxSandboxSecurityContext
impl RefUnwindSafe for LinuxSandboxSecurityContext
impl Send for LinuxSandboxSecurityContext
impl Sync for LinuxSandboxSecurityContext
impl Unpin for LinuxSandboxSecurityContext
impl UnsafeUnpin for LinuxSandboxSecurityContext
impl UnwindSafe for LinuxSandboxSecurityContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more