Class V1ContainerStatus
java.lang.Object
io.kubernetes.client.openapi.models.V1ContainerStatus
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2024-04-23T13:45:09.091597Z[Etc/UTC]")
public class V1ContainerStatus
extends Object
ContainerStatus contains details for the current status of this container.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddVolumeMountsItem
(V1VolumeMountStatus volumeMountsItem) allocatedResources
(Map<String, Quantity> allocatedResources) containerID
(String containerID) boolean
static V1ContainerStatus
Create an instance of V1ContainerStatus given an JSON stringAllocatedResources represents the compute resources allocated for this container by the node.ContainerID is the ID of the container in the format '<type>://<container_id>'.getImage()
Image is the name of container image that the container is running.ImageID is the image ID of the container's image.Get lastStategetName()
Name is a DNS_LABEL representing the unique name of the container.getReady()
Ready specifies whether the container is currently passing its readiness check.Get resourcesRestartCount holds the number of times the container has been restarted.Started indicates whether the container has finished its postStart lifecycle hook and passed its startup probe.getState()
Get stateStatus of volume mounts.int
hashCode()
lastState
(V1ContainerState lastState) putAllocatedResourcesItem
(String key, Quantity allocatedResourcesItem) resources
(V1ResourceRequirements resources) restartCount
(Integer restartCount) void
setAllocatedResources
(Map<String, Quantity> allocatedResources) void
setContainerID
(String containerID) void
void
setImageID
(String imageID) void
setLastState
(V1ContainerState lastState) void
void
void
setResources
(V1ResourceRequirements resources) void
setRestartCount
(Integer restartCount) void
setStarted
(Boolean started) void
setState
(V1ContainerState state) void
setVolumeMounts
(List<V1VolumeMountStatus> volumeMounts) state
(V1ContainerState state) toJson()
Convert an instance of V1ContainerStatus to an JSON stringtoString()
static void
validateJsonObject
(com.google.gson.JsonObject jsonObj) Validates the JSON Object and throws an exception if issues foundvolumeMounts
(List<V1VolumeMountStatus> volumeMounts)
-
Field Details
-
SERIALIZED_NAME_ALLOCATED_RESOURCES
- See Also:
-
SERIALIZED_NAME_CONTAINER_I_D
- See Also:
-
SERIALIZED_NAME_IMAGE
- See Also:
-
SERIALIZED_NAME_IMAGE_I_D
- See Also:
-
SERIALIZED_NAME_LAST_STATE
- See Also:
-
SERIALIZED_NAME_NAME
- See Also:
-
SERIALIZED_NAME_READY
- See Also:
-
SERIALIZED_NAME_RESOURCES
- See Also:
-
SERIALIZED_NAME_RESTART_COUNT
- See Also:
-
SERIALIZED_NAME_STARTED
- See Also:
-
SERIALIZED_NAME_STATE
- See Also:
-
SERIALIZED_NAME_VOLUME_MOUNTS
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
V1ContainerStatus
public V1ContainerStatus()
-
-
Method Details
-
allocatedResources
-
putAllocatedResourcesItem
-
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.- Returns:
- allocatedResources
-
setAllocatedResources
-
containerID
-
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\").- Returns:
- containerID
-
setContainerID
-
image
-
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.- Returns:
- image
-
setImage
-
imageID
-
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.- Returns:
- imageID
-
setImageID
-
lastState
-
getLastState
Get lastState- Returns:
- lastState
-
setLastState
-
name
-
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.- Returns:
- name
-
setName
-
ready
-
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.- Returns:
- ready
-
setReady
-
resources
-
getResources
Get resources- Returns:
- resources
-
setResources
-
restartCount
-
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.- Returns:
- restartCount
-
setRestartCount
-
started
-
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.- Returns:
- started
-
setStarted
-
state
-
getState
Get state- Returns:
- state
-
setState
-
volumeMounts
-
addVolumeMountsItem
-
getVolumeMounts
Status of volume mounts.- Returns:
- volumeMounts
-
setVolumeMounts
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonObject
Validates the JSON Object and throws an exception if issues found- Parameters:
jsonObj
- JSON Object- Throws:
IOException
- if the JSON Object is invalid with respect to V1ContainerStatus
-
fromJson
Create an instance of V1ContainerStatus given an JSON string- Parameters:
jsonString
- JSON string- Returns:
- An instance of V1ContainerStatus
- Throws:
IOException
- if the JSON string is invalid with respect to V1ContainerStatus
-
toJson
Convert an instance of V1ContainerStatus to an JSON string- Returns:
- JSON string
-