ContainerStatus

Struct ContainerStatus 

Source
pub struct ContainerStatus {
Show 15 fields pub name: Option<String>, pub state: Option<ContainerState>, pub last_state: Option<ContainerState>, pub ready: Option<bool>, pub restart_count: Option<i32>, pub image: Option<String>, pub image_id: Option<String>, pub container_id: Option<String>, pub started: Option<bool>, pub allocated_resources: BTreeMap<String, Quantity>, pub resources: Option<ResourceRequirements>, pub volume_mounts: Vec<VolumeMountStatus>, pub user: Option<ContainerUser>, pub allocated_resources_status: Vec<ResourceStatus>, pub stop_signal: Option<String>,
}
Expand description

ContainerStatus contains details for the current status of this container.

Fields§

§name: Option<String>

Name is a DNS_LABEL representing the unique name of the container. Each container in a pod must have a unique name across all container types. Cannot be updated.

§state: Option<ContainerState>

State holds details about the container’s current condition. +optional

§last_state: Option<ContainerState>

LastTerminationState holds the last termination state of the container to help debug container crashes and restarts. This field is not populated if the container is still running and RestartCount is 0. +optional

§ready: Option<bool>

Ready specifies whether the container is currently passing its readiness check. The value will change as readiness probes keep executing. If no readiness probes are specified, this field defaults to true once the container is fully started (see Started field).

The value is typically used to determine whether a container is ready to accept traffic.

§restart_count: Option<i32>

RestartCount holds the number of times the container has been restarted. Kubelet makes an effort to always increment the value, but there are cases when the state may be lost due to node restarts and then the value may be reset to 0. The value is never negative.

§image: Option<String>

Image is the name of container image that the container is running. The container image may not match the image used in the PodSpec, as it may have been resolved by the runtime. More info: https://kubernetes.io/docs/concepts/containers/images.

§image_id: Option<String>

ImageID is the image ID of the container’s image. The image ID may not match the image ID of the image used in the PodSpec, as it may have been resolved by the runtime.

§container_id: Option<String>

ContainerID is the ID of the container in the format ‘://<container_id>’. Where type is a container runtime identifier, returned from Version call of CRI API (for example “containerd”). +optional

§started: Option<bool>

Started indicates whether the container has finished its postStart lifecycle hook and passed its startup probe. Initialized as false, becomes true after startupProbe is considered successful. Resets to false when the container is restarted, or if kubelet loses state temporarily. In both cases, startup probes will run again. Is always true when no startupProbe is defined and container is running and has passed the postStart lifecycle hook. The null value must be treated the same as false. +optional

§allocated_resources: BTreeMap<String, Quantity>

AllocatedResources represents the compute resources allocated for this container by the node. Kubelet sets this value to Container.Resources.Requests upon successful pod admission and after successfully admitting desired pod resize. +featureGate=InPlacePodVerticalScalingAllocatedStatus +optional

§resources: Option<ResourceRequirements>

Resources represents the compute resource requests and limits that have been successfully enacted on the running container after it has been started or has been successfully resized. +featureGate=InPlacePodVerticalScaling +optional

§volume_mounts: Vec<VolumeMountStatus>

Status of volume mounts. +optional +patchMergeKey=mountPath +patchStrategy=merge +listType=map +listMapKey=mountPath +featureGate=RecursiveReadOnlyMounts

§user: Option<ContainerUser>

User represents user identity information initially attached to the first process of the container +featureGate=SupplementalGroupsPolicy +optional

§allocated_resources_status: Vec<ResourceStatus>

AllocatedResourcesStatus represents the status of various resources allocated for this Pod. +featureGate=ResourceHealthStatus +optional +patchMergeKey=name +patchStrategy=merge +listType=map +listMapKey=name

§stop_signal: Option<String>

StopSignal reports the effective stop signal for this container +featureGate=ContainerStopSignals +optional

Implementations§

Source§

impl ContainerStatus

Source

pub fn name(&self) -> &str

Returns the value of name, or the default value if name is unset.

Source

pub fn ready(&self) -> bool

Returns the value of ready, or the default value if ready is unset.

Source

pub fn restart_count(&self) -> i32

Returns the value of restart_count, or the default value if restart_count is unset.

Source

pub fn image(&self) -> &str

Returns the value of image, or the default value if image is unset.

Source

pub fn image_id(&self) -> &str

Returns the value of image_id, or the default value if image_id is unset.

Source

pub fn container_id(&self) -> &str

Returns the value of container_id, or the default value if container_id is unset.

Source

pub fn started(&self) -> bool

Returns the value of started, or the default value if started is unset.

Source

pub fn stop_signal(&self) -> &str

Returns the value of stop_signal, or the default value if stop_signal is unset.

Trait Implementations§

Source§

impl Clone for ContainerStatus

Source§

fn clone(&self) -> ContainerStatus

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ContainerStatus

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ContainerStatus

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Message for ContainerStatus

Source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
Source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
Source§

fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message to a buffer. Read more
Source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
Source§

fn encode_length_delimited( &self, buf: &mut impl BufMut, ) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
Source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
Source§

fn decode(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes an instance of the message from a buffer. Read more
Source§

fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes a length-delimited instance of the message from the buffer.
Source§

fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
Source§

fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
Source§

impl PartialEq for ContainerStatus

Source§

fn eq(&self, other: &ContainerStatus) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for ContainerStatus

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.