mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-12 12:48:51 +00:00
Initial support of propogating the termination reasons and image failure
to apiserver. Deprecated docker.Container from API completely. Conflicts: pkg/api/types.go pkg/kubelet/kubelet.go
This commit is contained in:
@@ -17,8 +17,9 @@ limitations under the License.
|
||||
package v1beta3
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
|
||||
"github.com/fsouza/go-dockerclient"
|
||||
)
|
||||
|
||||
// Common string formats
|
||||
@@ -312,12 +313,15 @@ type ContainerStateWaiting struct {
|
||||
}
|
||||
|
||||
type ContainerStateRunning struct {
|
||||
StartedAt time.Time `json:"startedAt,omitempty" yaml:"startedAt,omitempty"`
|
||||
}
|
||||
|
||||
type ContainerStateTerminated struct {
|
||||
ExitCode int `json:"exitCode,omitempty" yaml:"exitCode,omitempty"`
|
||||
Signal int `json:"signal,omitempty" yaml:"signal,omitempty"`
|
||||
Reason string `json:"reason,omitempty" yaml:"reason,omitempty"`
|
||||
ExitCode int `json:"exitCode" yaml:"exitCode"`
|
||||
Signal int `json:"signal,omitempty" yaml:"signal,omitempty"`
|
||||
Reason string `json:"reason,omitempty" yaml:"reason,omitempty"`
|
||||
StartedAt time.Time `json:"startedAt,omitempty" yaml:"startedAt,omitempty"`
|
||||
FinishedAt time.Time `json:"finishedAt,omitempty" yaml:"finishedAt,omitempty"`
|
||||
}
|
||||
|
||||
type ContainerState struct {
|
||||
@@ -336,14 +340,11 @@ type ContainerStatus struct {
|
||||
// TODO(dchen1107): Introduce our own NetworkSettings struct here?
|
||||
// TODO(dchen1107): Once we have done with integration with cadvisor, resource
|
||||
// usage should be included.
|
||||
// TODO(dchen1107): In long run, I think we should replace this with our own struct to remove
|
||||
// the dependency on docker.
|
||||
DetailInfo docker.Container `json:"detailInfo,omitempty" yaml:"detailInfo,omitempty"`
|
||||
}
|
||||
|
||||
// PodInfo contains one entry for every container with available info.
|
||||
// TODO(dchen1107): Replace docker.Container below with ContainerStatus defined above.
|
||||
type PodInfo map[string]docker.Container
|
||||
type PodInfo map[string]ContainerStatus
|
||||
|
||||
type RestartPolicyAlways struct{}
|
||||
|
||||
|
Reference in New Issue
Block a user