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 ‘
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
impl ContainerStatus
Sourcepub fn ready(&self) -> bool
pub fn ready(&self) -> bool
Returns the value of ready
, or the default value if ready
is unset.
Sourcepub fn restart_count(&self) -> i32
pub fn restart_count(&self) -> i32
Returns the value of restart_count
, or the default value if restart_count
is unset.
Sourcepub fn image(&self) -> &str
pub fn image(&self) -> &str
Returns the value of image
, or the default value if image
is unset.
Sourcepub fn image_id(&self) -> &str
pub fn image_id(&self) -> &str
Returns the value of image_id
, or the default value if image_id
is unset.
Sourcepub fn container_id(&self) -> &str
pub fn container_id(&self) -> &str
Returns the value of container_id
, or the default value if container_id
is unset.
Sourcepub fn started(&self) -> bool
pub fn started(&self) -> bool
Returns the value of started
, or the default value if started
is unset.
Sourcepub fn stop_signal(&self) -> &str
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
impl Clone for ContainerStatus
Source§fn clone(&self) -> ContainerStatus
fn clone(&self) -> ContainerStatus
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ContainerStatus
impl Debug for ContainerStatus
Source§impl Default for ContainerStatus
impl Default for ContainerStatus
Source§impl Message for ContainerStatus
impl Message for ContainerStatus
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
.