mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-14 13:45:06 +00:00
CRI: clarify the version string requirement
This commit is contained in:
@@ -239,9 +239,11 @@ type VersionResponse struct {
|
|||||||
Version *string `protobuf:"bytes,1,opt,name=version" json:"version,omitempty"`
|
Version *string `protobuf:"bytes,1,opt,name=version" json:"version,omitempty"`
|
||||||
// The name of the container runtime.
|
// The name of the container runtime.
|
||||||
RuntimeName *string `protobuf:"bytes,2,opt,name=runtime_name,json=runtimeName" json:"runtime_name,omitempty"`
|
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"`
|
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"`
|
RuntimeApiVersion *string `protobuf:"bytes,4,opt,name=runtime_api_version,json=runtimeApiVersion" json:"runtime_api_version,omitempty"`
|
||||||
XXX_unrecognized []byte `json:"-"`
|
XXX_unrecognized []byte `json:"-"`
|
||||||
}
|
}
|
||||||
|
@@ -65,9 +65,11 @@ message VersionResponse {
|
|||||||
optional string version = 1;
|
optional string version = 1;
|
||||||
// The name of the container runtime.
|
// The name of the container runtime.
|
||||||
optional string runtime_name = 2;
|
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;
|
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;
|
optional string runtime_api_version = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -49,7 +49,7 @@ const (
|
|||||||
containerTypeLabelContainer = "container"
|
containerTypeLabelContainer = "container"
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewDockerSevice(client dockertools.DockerInterface) DockerLegacyService {
|
func NewDockerService(client dockertools.DockerInterface) DockerLegacyService {
|
||||||
return &dockerService{
|
return &dockerService{
|
||||||
client: dockertools.NewInstrumentedDockerInterface(client),
|
client: dockertools.NewInstrumentedDockerInterface(client),
|
||||||
}
|
}
|
||||||
@@ -73,7 +73,7 @@ type dockerService struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Version returns the runtime name, runtime version and runtime API version
|
// 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()
|
v, err := ds.client.Version()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("docker: failed to get docker version: %v", err)
|
return nil, fmt.Errorf("docker: failed to get docker version: %v", err)
|
||||||
|
Reference in New Issue
Block a user