From 77aa4cd07cf840f006b5aa249334f033125fb3bb Mon Sep 17 00:00:00 2001 From: Yu-Ju Hong Date: Wed, 14 Sep 2016 16:48:01 -0700 Subject: [PATCH] CRI: clarify the version string requirement --- pkg/kubelet/api/v1alpha1/runtime/api.pb.go | 6 ++++-- pkg/kubelet/api/v1alpha1/runtime/api.proto | 6 ++++-- pkg/kubelet/dockershim/docker_service.go | 4 ++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/pkg/kubelet/api/v1alpha1/runtime/api.pb.go b/pkg/kubelet/api/v1alpha1/runtime/api.pb.go index 6505a229407..b4bf0ed69f9 100644 --- a/pkg/kubelet/api/v1alpha1/runtime/api.pb.go +++ b/pkg/kubelet/api/v1alpha1/runtime/api.pb.go @@ -239,9 +239,11 @@ type VersionResponse struct { Version *string `protobuf:"bytes,1,opt,name=version" json:"version,omitempty"` // The name of the container runtime. RuntimeName *string `protobuf:"bytes,2,opt,name=runtime_name,json=runtimeName" json:"runtime_name,omitempty"` - // The version of the container runtime. + // The version of the container runtime. The string should be + // semver-compatible. RuntimeVersion *string `protobuf:"bytes,3,opt,name=runtime_version,json=runtimeVersion" json:"runtime_version,omitempty"` - // The API version of the container runtime. + // The API version of the container runtime. The string should be + // semver-compatible. RuntimeApiVersion *string `protobuf:"bytes,4,opt,name=runtime_api_version,json=runtimeApiVersion" json:"runtime_api_version,omitempty"` XXX_unrecognized []byte `json:"-"` } diff --git a/pkg/kubelet/api/v1alpha1/runtime/api.proto b/pkg/kubelet/api/v1alpha1/runtime/api.proto index cfd1bac7bfe..e2d4286c918 100644 --- a/pkg/kubelet/api/v1alpha1/runtime/api.proto +++ b/pkg/kubelet/api/v1alpha1/runtime/api.proto @@ -65,9 +65,11 @@ message VersionResponse { optional string version = 1; // The name of the container runtime. optional string runtime_name = 2; - // The version of the container runtime. + // The version of the container runtime. The string should be + // semver-compatible. optional string runtime_version = 3; - // The API version of the container runtime. + // The API version of the container runtime. The string should be + // semver-compatible. optional string runtime_api_version = 4; } diff --git a/pkg/kubelet/dockershim/docker_service.go b/pkg/kubelet/dockershim/docker_service.go index 62db4fd0fbc..168f5e14c0b 100644 --- a/pkg/kubelet/dockershim/docker_service.go +++ b/pkg/kubelet/dockershim/docker_service.go @@ -49,7 +49,7 @@ const ( containerTypeLabelContainer = "container" ) -func NewDockerSevice(client dockertools.DockerInterface) DockerLegacyService { +func NewDockerService(client dockertools.DockerInterface) DockerLegacyService { return &dockerService{ client: dockertools.NewInstrumentedDockerInterface(client), } @@ -73,7 +73,7 @@ type dockerService struct { } // Version returns the runtime name, runtime version and runtime API version -func (ds *dockerService) Version(apiVersion string) (*runtimeApi.VersionResponse, error) { +func (ds *dockerService) Version(_ string) (*runtimeApi.VersionResponse, error) { v, err := ds.client.Version() if err != nil { return nil, fmt.Errorf("docker: failed to get docker version: %v", err)