mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-13 11:25:19 +00:00
CRI: Rename container/sandbox states
The enum constants are not namespaced. The shorter, unspecifc names are likely to cause naming conflicts in the future. Also replace "SandBox" with "Sandbox" in the API.
This commit is contained in:
@@ -72,13 +72,13 @@ func (c containerStatusByCreated) Less(i, j int) bool { return c[i].CreatedAt.Af
|
||||
// toKubeContainerState converts runtimeApi.ContainerState to kubecontainer.ContainerState.
|
||||
func toKubeContainerState(state runtimeApi.ContainerState) kubecontainer.ContainerState {
|
||||
switch state {
|
||||
case runtimeApi.ContainerState_CREATED:
|
||||
case runtimeApi.ContainerState_CONTAINER_CREATED:
|
||||
return kubecontainer.ContainerStateCreated
|
||||
case runtimeApi.ContainerState_RUNNING:
|
||||
case runtimeApi.ContainerState_CONTAINER_RUNNING:
|
||||
return kubecontainer.ContainerStateRunning
|
||||
case runtimeApi.ContainerState_EXITED:
|
||||
case runtimeApi.ContainerState_CONTAINER_EXITED:
|
||||
return kubecontainer.ContainerStateExited
|
||||
case runtimeApi.ContainerState_UNKNOWN:
|
||||
case runtimeApi.ContainerState_CONTAINER_UNKNOWN:
|
||||
return kubecontainer.ContainerStateUnknown
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user