Make rkt implement the container Runtime

This commit is contained in:
Victor Marmol
2015-05-01 16:12:14 -07:00
parent e44d9df0f4
commit ba7e940a57
3 changed files with 4 additions and 1 deletions

View File

@@ -74,7 +74,7 @@ type Runtime interface {
// default, it returns a snapshot of the container log. Set 'follow' to true to
// stream the log. Set 'follow' to false and specify the number of lines (e.g.
// "100" or "all") to tail the log.
GetContainerLogs(podUID *api.Pod, containerID, tail string, follow bool, stdout, stderr io.Writer) (err error)
GetContainerLogs(pod *api.Pod, containerID, tail string, follow bool, stdout, stderr io.Writer) (err error)
}
// Customizable hooks injected into container runtimes.

View File

@@ -1369,6 +1369,7 @@ func (kl *Kubelet) validateContainerStatus(podStatus *api.PodStatus, containerNa
// TODO: this method is returning logs of random container attempts, when it should be returning the most recent attempt
// or all of them.
func (kl *Kubelet) GetKubeletContainerLogs(podFullName, containerName, tail string, follow bool, stdout, stderr io.Writer) error {
// TODO(vmarmol): Refactor to not need the pod status and verification.
podStatus, err := kl.GetPodStatus(podFullName)
if err != nil {
return fmt.Errorf("failed to get status for pod %q - %v", podFullName, err)

View File

@@ -81,6 +81,8 @@ type Runtime struct {
dockerKeyring credentialprovider.DockerKeyring
}
var _ kubecontainer.Runtime = &Runtime{}
// New creates the rkt container runtime which implements the container runtime interface.
// It will test if the rkt binary is in the $PATH, and whether we can get the
// version of it. If so, creates the rkt container runtime, otherwise returns an error.