mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 11:13:48 +00:00
Merge pull request #5809 from dchen1107/podstatus
Introduced LastTerminateState to ContainerStatus
This commit is contained in:
commit
2a88c77522
@ -457,12 +457,13 @@ type ContainerStateRunning struct {
|
||||
}
|
||||
|
||||
type ContainerStateTerminated struct {
|
||||
ExitCode int `json:"exitCode"`
|
||||
Signal int `json:"signal,omitempty"`
|
||||
Reason string `json:"reason,omitempty"`
|
||||
Message string `json:"message,omitempty"`
|
||||
StartedAt util.Time `json:"startedAt,omitempty"`
|
||||
FinishedAt util.Time `json:"finishedAt,omitempty"`
|
||||
ExitCode int `json:"exitCode"`
|
||||
Signal int `json:"signal,omitempty"`
|
||||
Reason string `json:"reason,omitempty"`
|
||||
Message string `json:"message,omitempty"`
|
||||
StartedAt util.Time `json:"startedAt,omitempty"`
|
||||
FinishedAt util.Time `json:"finishedAt,omitempty"`
|
||||
ContainerID string `json:"containerID,omitempty"`
|
||||
}
|
||||
|
||||
// ContainerState holds a possible state of container.
|
||||
@ -477,7 +478,8 @@ type ContainerState struct {
|
||||
type ContainerStatus struct {
|
||||
// TODO(dchen1107): Should we rename PodStatus to a more generic name or have a separate states
|
||||
// defined for container?
|
||||
State ContainerState `json:"state,omitempty"`
|
||||
State ContainerState `json:"state,omitempty"`
|
||||
LastTerminationState ContainerState `json:"lastState,omitempty"`
|
||||
// Ready specifies whether the conatiner has passed its readiness check.
|
||||
Ready bool `json:"ready"`
|
||||
// Note that this is calculated from dead containers. But those containers are subject to
|
||||
|
@ -425,12 +425,13 @@ type ContainerStateRunning struct {
|
||||
}
|
||||
|
||||
type ContainerStateTerminated struct {
|
||||
ExitCode int `json:"exitCode" description:"exit status from the last termination of the container"`
|
||||
Signal int `json:"signal,omitempty" description:"signal from the last termination of the container"`
|
||||
Reason string `json:"reason,omitempty" description:"(brief) reason from the last termination of the container"`
|
||||
Message string `json:"message,omitempty" description:"message regarding the last termination of the container"`
|
||||
StartedAt util.Time `json:"startedAt,omitempty" description:"time at which previous execution of the container started"`
|
||||
FinishedAt util.Time `json:"finishedAt,omitempty" description:"time at which the container last terminated"`
|
||||
ExitCode int `json:"exitCode" description:"exit status from the last termination of the container"`
|
||||
Signal int `json:"signal,omitempty" description:"signal from the last termination of the container"`
|
||||
Reason string `json:"reason,omitempty" description:"(brief) reason from the last termination of the container"`
|
||||
Message string `json:"message,omitempty" description:"message regarding the last termination of the container"`
|
||||
StartedAt util.Time `json:"startedAt,omitempty" description:"time at which previous execution of the container started"`
|
||||
FinishedAt util.Time `json:"finishedAt,omitempty" description:"time at which the container last terminated"`
|
||||
ContainerID string `json:"containerID,omitempty" description:"container's ID in the format 'docker://<container_id>'"`
|
||||
}
|
||||
|
||||
// ContainerState holds a possible state of container.
|
||||
@ -445,8 +446,9 @@ type ContainerState struct {
|
||||
type ContainerStatus struct {
|
||||
// TODO(dchen1107): Should we rename PodStatus to a more generic name or have a separate states
|
||||
// defined for container?
|
||||
State ContainerState `json:"state,omitempty" description:"details about the container's current condition"`
|
||||
Ready bool `json:"ready" description:"specifies whether the container has passed its readiness probe"`
|
||||
State ContainerState `json:"state,omitempty" description:"details about the container's current condition"`
|
||||
LastTerminationState ContainerState `json:"lastState,omitempty" description:"details about the container's last termination condition"`
|
||||
Ready bool `json:"ready" description:"specifies whether the container has passed its readiness probe"`
|
||||
// Note that this is calculated from dead containers. But those containers are subject to
|
||||
// garbage collection. This value will get capped at 5 by GC.
|
||||
RestartCount int `json:"restartCount" description:"the number of times the container has been restarted, currently based on the number of dead containers that have not yet been removed"`
|
||||
|
@ -422,12 +422,13 @@ type ContainerStateRunning struct {
|
||||
}
|
||||
|
||||
type ContainerStateTerminated struct {
|
||||
ExitCode int `json:"exitCode" description:"exit status from the last termination of the container"`
|
||||
Signal int `json:"signal,omitempty" description:"signal from the last termination of the container"`
|
||||
Reason string `json:"reason,omitempty" description:"(brief) reason from the last termination of the container"`
|
||||
Message string `json:"message,omitempty" description:"message regarding the last termination of the container"`
|
||||
StartedAt util.Time `json:"startedAt,omitempty" description:"time at which previous execution of the container started"`
|
||||
FinishedAt util.Time `json:"finishedAt,omitempty" description:"time at which the container last terminated"`
|
||||
ExitCode int `json:"exitCode" description:"exit status from the last termination of the container"`
|
||||
Signal int `json:"signal,omitempty" description:"signal from the last termination of the container"`
|
||||
Reason string `json:"reason,omitempty" description:"(brief) reason from the last termination of the container"`
|
||||
Message string `json:"message,omitempty" description:"message regarding the last termination of the container"`
|
||||
StartedAt util.Time `json:"startedAt,omitempty" description:"time at which previous execution of the container started"`
|
||||
FinishedAt util.Time `json:"finishedAt,omitempty" description:"time at which the container last terminated"`
|
||||
ContainerID string `json:"containerID,omitempty" description:"container's ID in the format 'docker://<container_id>'"`
|
||||
}
|
||||
|
||||
// ContainerState holds a possible state of container.
|
||||
@ -442,8 +443,9 @@ type ContainerState struct {
|
||||
type ContainerStatus struct {
|
||||
// TODO(dchen1107): Should we rename PodStatus to a more generic name or have a separate states
|
||||
// defined for container?
|
||||
State ContainerState `json:"state,omitempty" description:"details about the container's current condition"`
|
||||
Ready bool `json:"ready" description:"specifies whether the container has passed its readiness probe"`
|
||||
State ContainerState `json:"state,omitempty" description:"details about the container's current condition"`
|
||||
LastTerminationState ContainerState `json:"lastState,omitempty" description:"details about the container's last termination condition"`
|
||||
Ready bool `json:"ready" description:"specifies whether the container has passed its readiness probe"`
|
||||
// Note that this is calculated from dead containers. But those containers are subject to
|
||||
// garbage collection. This value will get capped at 5 by GC.
|
||||
RestartCount int `json:"restartCount" description:"the number of times the container has been restarted, currently based on the number of dead containers that have not yet been removed"`
|
||||
|
@ -469,12 +469,13 @@ type ContainerStateRunning struct {
|
||||
}
|
||||
|
||||
type ContainerStateTerminated struct {
|
||||
ExitCode int `json:"exitCode" description:"exit status from the last termination of the container"`
|
||||
Signal int `json:"signal,omitempty" description:"signal from the last termination of the container"`
|
||||
Reason string `json:"reason,omitempty" description:"(brief) reason from the last termination of the container"`
|
||||
Message string `json:"message,omitempty" description:"message regarding the last termination of the container"`
|
||||
StartedAt util.Time `json:"startedAt,omitempty" description:"time at which previous execution of the container started"`
|
||||
FinishedAt util.Time `json:"finishedAt,omitempty" description:"time at which the container last terminated"`
|
||||
ExitCode int `json:"exitCode" description:"exit status from the last termination of the container"`
|
||||
Signal int `json:"signal,omitempty" description:"signal from the last termination of the container"`
|
||||
Reason string `json:"reason,omitempty" description:"(brief) reason from the last termination of the container"`
|
||||
Message string `json:"message,omitempty" description:"message regarding the last termination of the container"`
|
||||
StartedAt util.Time `json:"startedAt,omitempty" description:"time at which previous execution of the container started"`
|
||||
FinishedAt util.Time `json:"finishedAt,omitempty" description:"time at which the container last terminated"`
|
||||
ContainerID string `json:"containerID,omitempty" description:"container's ID in the format 'docker://<container_id>'"`
|
||||
}
|
||||
|
||||
// ContainerState holds a possible state of container.
|
||||
@ -489,8 +490,9 @@ type ContainerState struct {
|
||||
type ContainerStatus struct {
|
||||
// TODO(dchen1107): Should we rename PodStatus to a more generic name or have a separate states
|
||||
// defined for container?
|
||||
State ContainerState `json:"state,omitempty" description:"details about the container's current condition"`
|
||||
Ready bool `json:"ready" description:"specifies whether the container has passed its readiness probe"`
|
||||
State ContainerState `json:"state,omitempty" description:"details about the container's current condition"`
|
||||
LastTerminationState ContainerState `json:"lastState,omitempty" description:"details about the container's last termination condition"`
|
||||
Ready bool `json:"ready" description:"specifies whether the container has passed its readiness probe"`
|
||||
// Note that this is calculated from dead containers. But those containers are subject to
|
||||
// garbage collection. This value will get capped at 5 by GC.
|
||||
RestartCount int `json:"restartCount" description:"the number of times the container has been restarted, currently based on the number of dead containers that have not yet been removed"`
|
||||
|
Loading…
Reference in New Issue
Block a user