Merge pull request #83057 from bclau/windows/containerd

Windows: Fixes termination-file mounting support for containerd
This commit is contained in:
Kubernetes Prow Robot
2019-11-13 17:27:36 -08:00
committed by GitHub
7 changed files with 40 additions and 5 deletions

View File

@@ -63,6 +63,9 @@ type Runtime interface {
// Type returns the type of the container runtime.
Type() string
//SupportsSingleFileMapping returns whether the container runtime supports single file mappings or not.
SupportsSingleFileMapping() bool
// Version returns the version information of the container runtime.
Version() (Version, error)

View File

@@ -177,6 +177,10 @@ func (f *FakeRuntime) Type() string {
return f.RuntimeType
}
func (f *FakeRuntime) SupportsSingleFileMapping() bool {
return true
}
func (f *FakeRuntime) Version() (kubecontainer.Version, error) {
f.Lock()
defer f.Unlock()

View File

@@ -47,6 +47,11 @@ func (r *Mock) Type() string {
return args.Get(0).(string)
}
func (r *Mock) SupportsSingleFileMapping() bool {
args := r.Called()
return args.Get(0).(bool)
}
func (r *Mock) Version() (kubecontainer.Version, error) {
args := r.Called()
return args.Get(0).(kubecontainer.Version), args.Error(1)