add alpha version

Signed-off-by: Mike Brown <brownwm@us.ibm.com>
This commit is contained in:
Mike Brown
2021-07-06 11:40:20 -05:00
parent a5c417ac06
commit 14962dcbd2
2 changed files with 12 additions and 27 deletions

View File

@@ -20,6 +20,7 @@ import (
"github.com/containerd/containerd/version"
"golang.org/x/net/context"
runtime "k8s.io/cri-api/pkg/apis/runtime/v1"
runtime_alpha "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
"github.com/containerd/containerd/pkg/cri/constants"
)
@@ -40,3 +41,13 @@ func (c *criService) Version(ctx context.Context, r *runtime.VersionRequest) (*r
RuntimeApiVersion: constants.CRIVersion,
}, nil
}
// Version returns the runtime name, runtime version and runtime API version.
func (c *criService) AlphaVersion(ctx context.Context, r *runtime_alpha.VersionRequest) (*runtime_alpha.VersionResponse, error) {
return &runtime_alpha.VersionResponse{
Version: kubeAPIVersion,
RuntimeName: containerName,
RuntimeVersion: version.Version,
RuntimeApiVersion: constants.CRIVersionAlpha,
}, nil
}