Skip to content

core.v1.containerStatus

"ContainerStatus contains details for the current status of this container."

Index

Fields

fn withAllocatedResources

withAllocatedResources(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."

fn withAllocatedResourcesMixin

withAllocatedResourcesMixin(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."

Note: This function appends passed data to existing values

fn withContainerID

withContainerID(containerID)

"ContainerID is the ID of the container in the format '://'. Where type is a container runtime identifier, returned from Version call of CRI API (for example \"containerd\")."

fn withImage

withImage(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."

fn withImageID

withImageID(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."

fn withName

withName(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."

fn withReady

withReady(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).\n\nThe value is typically used to determine whether a container is ready to accept traffic."

fn withRestartCount

withRestartCount(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."

fn withStarted

withStarted(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."

obj lastState

"ContainerState holds a possible state of container. Only one of its members may be specified. If none of them is specified, the default one is ContainerStateWaiting."

obj lastState.running

"ContainerStateRunning is a running state of a container."

fn lastState.running.withStartedAt

withStartedAt(startedAt)

"Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers."

obj lastState.terminated

"ContainerStateTerminated is a terminated state of a container."

fn lastState.terminated.withContainerID

withContainerID(containerID)

"Container's ID in the format '://'"

fn lastState.terminated.withExitCode

withExitCode(exitCode)

"Exit status from the last termination of the container"

fn lastState.terminated.withFinishedAt

withFinishedAt(finishedAt)

"Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers."

fn lastState.terminated.withMessage

withMessage(message)

"Message regarding the last termination of the container"

fn lastState.terminated.withReason

withReason(reason)

"(brief) reason from the last termination of the container"

fn lastState.terminated.withSignal

withSignal(signal)

"Signal from the last termination of the container"

fn lastState.terminated.withStartedAt

withStartedAt(startedAt)

"Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers."

obj lastState.waiting

"ContainerStateWaiting is a waiting state of a container."

fn lastState.waiting.withMessage

withMessage(message)

"Message regarding why the container is not yet running."

fn lastState.waiting.withReason

withReason(reason)

"(brief) reason the container is not yet running."

obj resources

"ResourceRequirements describes the compute resource requirements."

fn resources.withClaims

withClaims(claims)

"Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container.\n\nThis is an alpha field and requires enabling the DynamicResourceAllocation feature gate.\n\nThis field is immutable. It can only be set for containers."

fn resources.withClaimsMixin

withClaimsMixin(claims)

"Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container.\n\nThis is an alpha field and requires enabling the DynamicResourceAllocation feature gate.\n\nThis field is immutable. It can only be set for containers."

Note: This function appends passed data to existing values

fn resources.withLimits

withLimits(limits)

"Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/"

fn resources.withLimitsMixin

withLimitsMixin(limits)

"Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/"

Note: This function appends passed data to existing values

fn resources.withRequests

withRequests(requests)

"Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/"

fn resources.withRequestsMixin

withRequestsMixin(requests)

"Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/"

Note: This function appends passed data to existing values

obj state

"ContainerState holds a possible state of container. Only one of its members may be specified. If none of them is specified, the default one is ContainerStateWaiting."

obj state.running

"ContainerStateRunning is a running state of a container."

fn state.running.withStartedAt

withStartedAt(startedAt)

"Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers."

obj state.terminated

"ContainerStateTerminated is a terminated state of a container."

fn state.terminated.withContainerID

withContainerID(containerID)

"Container's ID in the format '://'"

fn state.terminated.withExitCode

withExitCode(exitCode)

"Exit status from the last termination of the container"

fn state.terminated.withFinishedAt

withFinishedAt(finishedAt)

"Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers."

fn state.terminated.withMessage

withMessage(message)

"Message regarding the last termination of the container"

fn state.terminated.withReason

withReason(reason)

"(brief) reason from the last termination of the container"

fn state.terminated.withSignal

withSignal(signal)

"Signal from the last termination of the container"

fn state.terminated.withStartedAt

withStartedAt(startedAt)

"Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers."

obj state.waiting

"ContainerStateWaiting is a waiting state of a container."

fn state.waiting.withMessage

withMessage(message)

"Message regarding why the container is not yet running."

fn state.waiting.withReason

withReason(reason)

"(brief) reason the container is not yet running."