Class ContainerStatus
- java.lang.Object
-
- com.marcnuri.yakc.model.io.k8s.api.core.v1.ContainerStatus
-
- All Implemented Interfaces:
com.marcnuri.yakc.model.Model
public class ContainerStatus extends java.lang.Object implements com.marcnuri.yakc.model.Model
ContainerStatus contains details for the current status of this container.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ContainerStatus.Builder
-
Constructor Summary
Constructors Constructor Description ContainerStatus()
ContainerStatus(java.util.Map<java.lang.String,java.lang.String> allocatedResources, java.lang.String containerID, @NonNull java.lang.String image, @NonNull java.lang.String imageID, ContainerState lastState, @NonNull java.lang.String name, @NonNull java.lang.Boolean ready, ResourceRequirements resources, @NonNull java.lang.Number restartCount, java.lang.Boolean started, ContainerState state)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ContainerStatus.Builder
builder()
protected boolean
canEqual(java.lang.Object other)
boolean
equals(java.lang.Object o)
java.util.Map<java.lang.String,java.lang.String>
getAllocatedResources()
AllocatedResources represents the compute resources allocated for this container by the node.java.lang.String
getContainerID()
ContainerID is the ID of the container in the format '<type>://<container_id>'.@NonNull java.lang.String
getImage()
Image is the name of container image that the container is running.@NonNull java.lang.String
getImageID()
ImageID is the image ID of the container's image.ContainerState
getLastState()
@NonNull java.lang.String
getName()
Name is a DNS_LABEL representing the unique name of the container.@NonNull java.lang.Boolean
getReady()
Ready specifies whether the container is currently passing its readiness check.ResourceRequirements
getResources()
@NonNull java.lang.Number
getRestartCount()
RestartCount holds the number of times the container has been restarted.java.lang.Boolean
getStarted()
Started indicates whether the container has finished its postStart lifecycle hook and passed its startup probe.ContainerState
getState()
int
hashCode()
void
setAllocatedResources(java.util.Map<java.lang.String,java.lang.String> allocatedResources)
AllocatedResources represents the compute resources allocated for this container by the node.void
setContainerID(java.lang.String containerID)
ContainerID is the ID of the container in the format '<type>://<container_id>'.void
setImage(@NonNull java.lang.String image)
Image is the name of container image that the container is running.void
setImageID(@NonNull java.lang.String imageID)
ImageID is the image ID of the container's image.void
setLastState(ContainerState lastState)
void
setName(@NonNull java.lang.String name)
Name is a DNS_LABEL representing the unique name of the container.void
setReady(@NonNull java.lang.Boolean ready)
Ready specifies whether the container is currently passing its readiness check.void
setResources(ResourceRequirements resources)
void
setRestartCount(@NonNull java.lang.Number restartCount)
RestartCount holds the number of times the container has been restarted.void
setStarted(java.lang.Boolean started)
Started indicates whether the container has finished its postStart lifecycle hook and passed its startup probe.void
setState(ContainerState state)
ContainerStatus.Builder
toBuilder()
java.lang.String
toString()
-
-
-
Constructor Detail
-
ContainerStatus
public ContainerStatus(java.util.Map<java.lang.String,java.lang.String> allocatedResources, java.lang.String containerID, @NonNull @NonNull java.lang.String image, @NonNull @NonNull java.lang.String imageID, ContainerState lastState, @NonNull @NonNull java.lang.String name, @NonNull @NonNull java.lang.Boolean ready, ResourceRequirements resources, @NonNull @NonNull java.lang.Number restartCount, java.lang.Boolean started, ContainerState state)
-
ContainerStatus
public ContainerStatus()
-
-
Method Detail
-
builder
public static ContainerStatus.Builder builder()
-
toBuilder
public ContainerStatus.Builder toBuilder()
-
getAllocatedResources
public java.util.Map<java.lang.String,java.lang.String> getAllocatedResources()
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.
-
getContainerID
public java.lang.String getContainerID()
ContainerID is the ID of the container in the format '<type>://<container_id>'. Where type is a container runtime identifier, returned from Version call of CRI API (for example "containerd").
-
getImage
@NonNull public @NonNull java.lang.String getImage()
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.
-
getImageID
@NonNull public @NonNull java.lang.String getImageID()
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.
-
getLastState
public ContainerState getLastState()
-
getName
@NonNull public @NonNull java.lang.String getName()
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.
-
getReady
@NonNull public @NonNull java.lang.Boolean getReady()
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.
-
getResources
public ResourceRequirements getResources()
-
getRestartCount
@NonNull public @NonNull java.lang.Number getRestartCount()
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.
-
getStarted
public java.lang.Boolean getStarted()
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.
-
getState
public ContainerState getState()
-
setAllocatedResources
public void setAllocatedResources(java.util.Map<java.lang.String,java.lang.String> allocatedResources)
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.
-
setContainerID
public void setContainerID(java.lang.String containerID)
ContainerID is the ID of the container in the format '<type>://<container_id>'. Where type is a container runtime identifier, returned from Version call of CRI API (for example "containerd").
-
setImage
public void setImage(@NonNull @NonNull java.lang.String image)
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.
-
setImageID
public void setImageID(@NonNull @NonNull java.lang.String imageID)
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.
-
setLastState
public void setLastState(ContainerState lastState)
-
setName
public void setName(@NonNull @NonNull java.lang.String name)
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.
-
setReady
public void setReady(@NonNull @NonNull java.lang.Boolean ready)
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.
-
setResources
public void setResources(ResourceRequirements resources)
-
setRestartCount
public void setRestartCount(@NonNull @NonNull java.lang.Number restartCount)
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.
-
setStarted
public void setStarted(java.lang.Boolean started)
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.
-
setState
public void setState(ContainerState state)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-