pub struct NamespaceOption {
pub network: i32,
pub pid: i32,
pub ipc: i32,
pub target_id: String,
pub userns_options: Option<UserNamespace>,
}Expand description
NamespaceOption provides options for Linux namespaces.
Fields§
§network: i32Network namespace for this container/sandbox. Note: There is currently no way to set CONTAINER scoped network in the Kubernetes API. Namespaces currently set by the kubelet: POD, NODE
pid: i32PID namespace for this container/sandbox. Note: The CRI default is POD, but the v1.PodSpec default is CONTAINER. The kubelet’s runtime manager will set this to CONTAINER explicitly for v1 pods. Namespaces currently set by the kubelet: POD, CONTAINER, NODE, TARGET
ipc: i32IPC namespace for this container/sandbox. Note: There is currently no way to set CONTAINER scoped IPC in the Kubernetes API. Namespaces currently set by the kubelet: POD, NODE
target_id: StringTarget Container ID for NamespaceMode of TARGET. This container must have been previously created in the same pod. It is not possible to specify different targets for each namespace.
userns_options: Option<UserNamespace>UsernsOptions for this pod sandbox. The Kubelet picks the user namespace configuration to use for the pod sandbox. The mappings are specified as part of the UserNamespace struct. If the struct is nil, then the POD mode must be assumed. This is done for backward compatibility with older Kubelet versions that do not set a user namespace.
Implementations§
Source§impl NamespaceOption
impl NamespaceOption
Sourcepub fn network(&self) -> NamespaceMode
pub fn network(&self) -> NamespaceMode
Returns the enum value of network, or the default if the field is set to an invalid enum value.
Sourcepub fn set_network(&mut self, value: NamespaceMode)
pub fn set_network(&mut self, value: NamespaceMode)
Sets network to the provided enum value.
Sourcepub fn pid(&self) -> NamespaceMode
pub fn pid(&self) -> NamespaceMode
Returns the enum value of pid, or the default if the field is set to an invalid enum value.
Sourcepub fn set_pid(&mut self, value: NamespaceMode)
pub fn set_pid(&mut self, value: NamespaceMode)
Sets pid to the provided enum value.
Sourcepub fn ipc(&self) -> NamespaceMode
pub fn ipc(&self) -> NamespaceMode
Returns the enum value of ipc, or the default if the field is set to an invalid enum value.
Sourcepub fn set_ipc(&mut self, value: NamespaceMode)
pub fn set_ipc(&mut self, value: NamespaceMode)
Sets ipc to the provided enum value.
Trait Implementations§
Source§impl Clone for NamespaceOption
impl Clone for NamespaceOption
Source§fn clone(&self) -> NamespaceOption
fn clone(&self) -> NamespaceOption
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NamespaceOption
impl Debug for NamespaceOption
Source§impl Default for NamespaceOption
impl Default for NamespaceOption
Source§impl<'de> Deserialize<'de> for NamespaceOption
impl<'de> Deserialize<'de> for NamespaceOption
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 Message for NamespaceOption
impl Message for NamespaceOption
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 PartialEq for NamespaceOption
impl PartialEq for NamespaceOption
Source§impl Serialize for NamespaceOption
impl Serialize for NamespaceOption
impl StructuralPartialEq for NamespaceOption
Auto Trait Implementations§
impl Freeze for NamespaceOption
impl RefUnwindSafe for NamespaceOption
impl Send for NamespaceOption
impl Sync for NamespaceOption
impl Unpin for NamespaceOption
impl UnwindSafe for NamespaceOption
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request