Skip to content

Commit

Permalink
Add constructor for unsupported rkt
Browse files Browse the repository at this point in the history
  • Loading branch information
vmarmol committed May 5, 2015
1 parent 7b10ce9 commit bbe1982
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/kubelet/rkt/gc.go
Expand Up @@ -18,11 +18,10 @@ package rkt

// ImageManager manages and garbage collects the container images for rkt.
type ImageManager struct {
runtime *runtime
}

func NewImageManager(r *runtime) *ImageManager {
return &ImageManager{runtime: r}
func NewImageManager() *ImageManager {
return &ImageManager{}
}

// GarbageCollect collects the images. It is not implemented by rkt yet.
Expand Down
9 changes: 9 additions & 0 deletions pkg/kubelet/rkt/rkt_unsupported.go
Expand Up @@ -23,6 +23,7 @@ import (
"io"

"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
"github.com/GoogleCloudPlatform/kubernetes/pkg/client/record"
kubecontainer "github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet/container"
)

Expand All @@ -32,6 +33,14 @@ 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) {
Expand Down

0 comments on commit bbe1982

Please sign in to comment.