From b3e3a7d11bc5046101d3c9b9233bc455c925269e Mon Sep 17 00:00:00 2001 From: Pengfei Ni Date: Fri, 23 Mar 2018 13:44:10 +0800 Subject: [PATCH] Clarify runtime behavior for symlinked and non-exist hostPath --- pkg/kubelet/apis/cri/runtime/v1alpha2/api.pb.go | 4 +++- pkg/kubelet/apis/cri/runtime/v1alpha2/api.proto | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pkg/kubelet/apis/cri/runtime/v1alpha2/api.pb.go b/pkg/kubelet/apis/cri/runtime/v1alpha2/api.pb.go index 82e5a5e5e3d..4ffcdd91537 100644 --- a/pkg/kubelet/apis/cri/runtime/v1alpha2/api.pb.go +++ b/pkg/kubelet/apis/cri/runtime/v1alpha2/api.pb.go @@ -434,7 +434,9 @@ func (m *PortMapping) GetHostIp() string { type Mount struct { // Path of the mount within the container. ContainerPath string `protobuf:"bytes,1,opt,name=container_path,json=containerPath,proto3" json:"container_path,omitempty"` - // Path of the mount on the host. + // Path of the mount on the host. If the hostPath doesn't exist, then runtimes + // should report error. If the hostpath is a symbolic link, runtimes should + // follow the symlink and mount the real destination to container. HostPath string `protobuf:"bytes,2,opt,name=host_path,json=hostPath,proto3" json:"host_path,omitempty"` // If set, the mount is read-only. Readonly bool `protobuf:"varint,3,opt,name=readonly,proto3" json:"readonly,omitempty"` diff --git a/pkg/kubelet/apis/cri/runtime/v1alpha2/api.proto b/pkg/kubelet/apis/cri/runtime/v1alpha2/api.proto index 382f1813895..8c4157d5242 100644 --- a/pkg/kubelet/apis/cri/runtime/v1alpha2/api.proto +++ b/pkg/kubelet/apis/cri/runtime/v1alpha2/api.proto @@ -171,7 +171,9 @@ enum MountPropagation { message Mount { // Path of the mount within the container. string container_path = 1; - // Path of the mount on the host. + // Path of the mount on the host. If the hostPath doesn't exist, then runtimes + // should report error. If the hostpath is a symbolic link, runtimes should + // follow the symlink and mount the real destination to container. string host_path = 2; // If set, the mount is read-only. bool readonly = 3;