mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-20 09:33:52 +00:00
Windows: Fixes termination-file mounting for containerd
If Containerd is used on Windows, then we can also mount individual files into containers (e.g.: termination-log files), which was not possible with Docker. Checks if the container runtime is containerd, and if it is, then also mount the termination-log file.
This commit is contained in:
@@ -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)
|
||||
|
||||
|
@@ -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()
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user