Add a Degraded state to pods

Make a distinction between pods that are completely running (all
containers running) and those that have some containers going,
but not all, by introducing an intermediate state between Stopped
and Running called Degraded. A Degraded pod has at least one, but
not all, containers running; a Running pod has all containers
running.

First step to a solution for #7213.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
This commit is contained in:
Matthew Heon
2020-10-20 14:32:33 -04:00
parent 36682115b0
commit cddfe3983b
4 changed files with 41 additions and 6 deletions

View File

@ -506,7 +506,7 @@ func (p *Pod) Inspect() (*define.InspectPodData, error) {
})
ctrStatuses[c.ID()] = c.state.State
}
podState, err := CreatePodStatusResults(ctrStatuses)
podState, err := createPodStatusResults(ctrStatuses)
if err != nil {
return nil, err
}