Revert "Kubelet: Add rkt as a runtime option"
This commit is contained in:
@@ -18,10 +18,11 @@ package rkt
|
||||
|
||||
// ImageManager manages and garbage collects the container images for rkt.
|
||||
type ImageManager struct {
|
||||
runtime *runtime
|
||||
}
|
||||
|
||||
func NewImageManager() *ImageManager {
|
||||
return &ImageManager{}
|
||||
func NewImageManager(r *runtime) *ImageManager {
|
||||
return &ImageManager{runtime: r}
|
||||
}
|
||||
|
||||
// GarbageCollect collects the images. It is not implemented by rkt yet.
|
||||
|
@@ -34,7 +34,6 @@ import (
|
||||
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/capabilities"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/client/record"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/credentialprovider"
|
||||
kubecontainer "github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet/container"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet/prober"
|
||||
@@ -106,11 +105,7 @@ 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.
|
||||
func New(config *Config,
|
||||
generator kubecontainer.RunContainerOptionsGenerator,
|
||||
recorder record.EventRecorder,
|
||||
containerRefManager *kubecontainer.RefManager,
|
||||
readinessManager *kubecontainer.ReadinessManager) (kubecontainer.Runtime, error) {
|
||||
func New(config *Config) (kubecontainer.Runtime, error) {
|
||||
systemdVersion, err := getSystemdVersion()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -135,14 +130,11 @@ func New(config *Config,
|
||||
}
|
||||
|
||||
rkt := &runtime{
|
||||
generator: generator,
|
||||
readinessManager: readinessManager,
|
||||
systemd: systemd,
|
||||
rktBinAbsPath: rktBinAbsPath,
|
||||
config: config,
|
||||
dockerKeyring: credentialprovider.NewDockerKeyring(),
|
||||
systemd: systemd,
|
||||
rktBinAbsPath: rktBinAbsPath,
|
||||
config: config,
|
||||
dockerKeyring: credentialprovider.NewDockerKeyring(),
|
||||
}
|
||||
rkt.prober = prober.New(rkt, readinessManager, containerRefManager, recorder)
|
||||
|
||||
// Test the rkt version.
|
||||
version, err := rkt.Version()
|
||||
|
@@ -23,7 +23,6 @@ import (
|
||||
"io"
|
||||
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/client/record"
|
||||
kubecontainer "github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet/container"
|
||||
)
|
||||
|
||||
@@ -33,14 +32,6 @@ type unsupportedRuntime struct {
|
||||
|
||||
var _ kubecontainer.Runtime = &unsupportedRuntime{}
|
||||
|
||||
func New(config *Config,
|
||||
generator kubecontainer.RunContainerOptionsGenerator,
|
||||
recorder record.EventRecorder,
|
||||
containerRefManager *kubecontainer.RefManager,
|
||||
readinessManager *kubecontainer.ReadinessManager) (kubecontainer.Runtime, error) {
|
||||
return nil, unsupportedError
|
||||
}
|
||||
|
||||
var unsupportedError = fmt.Errorf("rkt runtime is unsupported in this platform")
|
||||
|
||||
func (ur *unsupportedRuntime) Version() (kubecontainer.Version, error) {
|
||||
|
Reference in New Issue
Block a user