+
+
```console
$ crictl info
{
@@ -182,35 +185,154 @@ $ crictl info
}
]
},
+ "cniconfig": {
+ "PluginDirs": [
+ "/opt/cni/bin"
+ ],
+ "PluginConfDir": "/etc/cni/net.d",
+ "PluginMaxConfNum": 1,
+ "Prefix": "eth",
+ "Networks": []
+ },
"config": {
"containerd": {
"snapshotter": "overlayfs",
- "runtime": "io.containerd.runtime.v1.linux"
+ "defaultRuntimeName": "runc",
+ "defaultRuntime": {
+ "runtimeType": "",
+ "runtimePath": "",
+ "runtimeEngine": "",
+ "PodAnnotations": [],
+ "ContainerAnnotations": [],
+ "runtimeRoot": "",
+ "options": {},
+ "privileged_without_host_devices": false,
+ "privileged_without_host_devices_all_devices_allowed": false,
+ "baseRuntimeSpec": "",
+ "cniConfDir": "",
+ "cniMaxConfNum": 0,
+ "snapshotter": "",
+ "sandboxMode": ""
+ },
+ "untrustedWorkloadRuntime": {
+ "runtimeType": "",
+ "runtimePath": "",
+ "runtimeEngine": "",
+ "PodAnnotations": [],
+ "ContainerAnnotations": [],
+ "runtimeRoot": "",
+ "options": {},
+ "privileged_without_host_devices": false,
+ "privileged_without_host_devices_all_devices_allowed": false,
+ "baseRuntimeSpec": "",
+ "cniConfDir": "",
+ "cniMaxConfNum": 0,
+ "snapshotter": "",
+ "sandboxMode": ""
+ },
+ "runtimes": {
+ "runc": {
+ "runtimeType": "io.containerd.runc.v2",
+ "runtimePath": "",
+ "runtimeEngine": "",
+ "PodAnnotations": [],
+ "ContainerAnnotations": [],
+ "runtimeRoot": "",
+ "options": {
+ "BinaryName": "",
+ "CriuImagePath": "",
+ "CriuPath": "",
+ "CriuWorkPath": "",
+ "IoGid": 0,
+ "IoUid": 0,
+ "NoNewKeyring": false,
+ "NoPivotRoot": false,
+ "Root": "",
+ "ShimCgroup": "",
+ "SystemdCgroup": false
+ },
+ "privileged_without_host_devices": false,
+ "privileged_without_host_devices_all_devices_allowed": false,
+ "baseRuntimeSpec": "",
+ "cniConfDir": "",
+ "cniMaxConfNum": 0,
+ "snapshotter": "",
+ "sandboxMode": "podsandbox"
+ }
+ },
+ "noPivot": false,
+ "disableSnapshotAnnotations": true,
+ "discardUnpackedLayers": false,
+ "ignoreBlockIONotEnabledErrors": false,
+ "ignoreRdtNotEnabledErrors": false
},
"cni": {
"binDir": "/opt/cni/bin",
- "confDir": "/etc/cni/net.d"
+ "confDir": "/etc/cni/net.d",
+ "maxConfNum": 1,
+ "setupSerially": false,
+ "confTemplate": "",
+ "ipPref": ""
},
"registry": {
- "mirrors": {
- "docker.io": {
- "endpoint": [
- "https://registry-1.docker.io"
- ]
- }
- }
+ "configPath": "",
+ "mirrors": {},
+ "configs": {},
+ "auths": {},
+ "headers": {}
},
- "streamServerPort": "10010",
- "sandboxImage": "registry.k8s.io/pause:3.7",
+ "imageDecryption": {
+ "keyModel": "node"
+ },
+ "disableTCPService": true,
+ "streamServerAddress": "127.0.0.1",
+ "streamServerPort": "0",
+ "streamIdleTimeout": "4h0m0s",
+ "enableSelinux": false,
+ "selinuxCategoryRange": 1024,
+ "sandboxImage": "registry.k8s.io/pause:3.8",
"statsCollectPeriod": 10,
+ "systemdCgroup": false,
+ "enableTLSStreaming": false,
+ "x509KeyPairStreaming": {
+ "tlsCertFile": "",
+ "tlsKeyFile": ""
+ },
+ "maxContainerLogSize": 16384,
+ "disableCgroup": false,
+ "disableApparmor": false,
+ "restrictOOMScoreAdj": false,
+ "maxConcurrentDownloads": 3,
+ "disableProcMount": false,
+ "unsetSeccompProfile": "",
+ "tolerateMissingHugetlbController": true,
+ "disableHugetlbController": true,
+ "device_ownership_from_security_context": false,
+ "ignoreImageDefinedVolumes": false,
+ "netnsMountsUnderStateDir": false,
+ "enableUnprivilegedPorts": false,
+ "enableUnprivilegedICMP": false,
+ "enableCDI": false,
+ "cdiSpecDirs": [
+ "/etc/cdi",
+ "/var/run/cdi"
+ ],
+ "imagePullProgressTimeout": "1m0s",
+ "drainExecSyncIOTimeout": "0s",
"containerdRootDir": "/var/lib/containerd",
- "containerdEndpoint": "unix:///run/containerd/containerd.sock",
+ "containerdEndpoint": "/run/containerd/containerd.sock",
"rootDir": "/var/lib/containerd/io.containerd.grpc.v1.cri",
- "stateDir": "/run/containerd/io.containerd.grpc.v1.cri",
+ "stateDir": "/run/containerd/io.containerd.grpc.v1.cri"
},
- "golang": "go1.10"
+ "golang": "go1.20.2",
+ "lastCNILoadStatus": "OK",
+ "lastCNILoadStatus.default": "OK"
}
```
+
+
+
+
## More Information
See [here](https://github.com/kubernetes-sigs/cri-tools/blob/master/docs/crictl.md)
for information about crictl.
diff --git a/pkg/cri/constants/constants.go b/pkg/cri/constants/constants.go
index 176a0e667..2e9aa680a 100644
--- a/pkg/cri/constants/constants.go
+++ b/pkg/cri/constants/constants.go
@@ -21,6 +21,4 @@ const (
K8sContainerdNamespace = "k8s.io"
// CRIVersion is the latest CRI version supported by the CRI plugin.
CRIVersion = "v1"
- // CRIVersionAlpha is the alpha version of CRI supported by the CRI plugin.
- CRIVersionAlpha = "v1alpha2"
)
diff --git a/pkg/cri/cri.go b/pkg/cri/cri.go
index 8fa806b68..c27a53bc7 100644
--- a/pkg/cri/cri.go
+++ b/pkg/cri/cri.go
@@ -56,7 +56,7 @@ func init() {
func initCRIService(ic *plugin.InitContext) (interface{}, error) {
ic.Meta.Platforms = []imagespec.Platform{platforms.DefaultSpec()}
- ic.Meta.Exports = map[string]string{"CRIVersion": constants.CRIVersion, "CRIVersionAlpha": constants.CRIVersionAlpha}
+ ic.Meta.Exports = map[string]string{"CRIVersion": constants.CRIVersion}
ctx := ic.Context
pluginConfig := ic.Config.(*criconfig.PluginConfig)
if err := criconfig.ValidatePluginConfig(ctx, pluginConfig); err != nil {
diff --git a/pkg/cri/instrument/instrumented_service.go b/pkg/cri/instrument/instrumented_service.go
index b259a86ed..4fd0de443 100644
--- a/pkg/cri/instrument/instrumented_service.go
+++ b/pkg/cri/instrument/instrumented_service.go
@@ -22,7 +22,6 @@ import (
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/log"
- runtime_alpha "github.com/containerd/containerd/third_party/k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
"github.com/containerd/containerd/tracing"
runtime "k8s.io/cri-api/pkg/apis/runtime/v1"
@@ -39,9 +38,6 @@ type criService interface {
GRPCServices
IsInitialized() bool
-
- // AlphaVersion returns the runtime name, runtime version and runtime API version.
- AlphaVersion(ctx context.Context, r *runtime_alpha.VersionRequest) (*runtime_alpha.VersionResponse, error)
}
// GRPCServices are all the grpc services provided by cri containerd.
@@ -50,11 +46,6 @@ type GRPCServices interface {
runtime.ImageServiceServer
}
-type GRPCAlphaServices interface {
- runtime_alpha.RuntimeServiceServer
- runtime_alpha.ImageServiceServer
-}
-
// instrumentedService wraps service with containerd namespace and logs.
type instrumentedService struct {
c criService
@@ -64,17 +55,6 @@ func NewService(c criService) GRPCServices {
return &instrumentedService{c: c}
}
-// instrumentedAlphaService wraps service with containerd namespace and logs.
-type instrumentedAlphaService struct {
- c criService
- runtime_alpha.UnimplementedRuntimeServiceServer
- runtime_alpha.UnimplementedImageServiceServer
-}
-
-func NewAlphaService(c criService) GRPCAlphaServices {
- return &instrumentedAlphaService{c: c}
-}
-
// checkInitialized returns error if the server is not fully initialized.
// GRPC service request handlers should return error before server is fully
// initialized.
@@ -86,17 +66,6 @@ func (in *instrumentedService) checkInitialized() error {
return errors.New("server is not initialized yet")
}
-// checkInitialized returns error if the server is not fully initialized.
-// GRPC service request handlers should return error before server is fully
-// initialized.
-// NOTE(random-liu): All following functions MUST check initialized at the beginning.
-func (in *instrumentedAlphaService) checkInitialized() error {
- if in.c.IsInitialized() {
- return nil
- }
- return errors.New("server is not initialized yet")
-}
-
func (in *instrumentedService) RunPodSandbox(ctx context.Context, r *runtime.RunPodSandboxRequest) (res *runtime.RunPodSandboxResponse, err error) {
if err := in.checkInitialized(); err != nil {
return nil, err
@@ -113,43 +82,6 @@ func (in *instrumentedService) RunPodSandbox(ctx context.Context, r *runtime.Run
return res, errdefs.ToGRPC(err)
}
-func (in *instrumentedAlphaService) RunPodSandbox(ctx context.Context, r *runtime_alpha.RunPodSandboxRequest) (res *runtime_alpha.RunPodSandboxResponse, err error) {
- if err := in.checkInitialized(); err != nil {
- return nil, err
- }
- log.G(ctx).Infof("RunPodSandbox for %+v", r.GetConfig().GetMetadata())
- defer func() {
- if err != nil {
- log.G(ctx).WithError(err).Errorf("RunPodSandbox for %+v failed, error", r.GetConfig().GetMetadata())
- } else {
- log.G(ctx).Infof("RunPodSandbox for %+v returns sandbox id %q", r.GetConfig().GetMetadata(), res.GetPodSandboxId())
- }
- }()
- // converts request and response for earlier CRI version to call and get response from the current version
- var v1r runtime.RunPodSandboxRequest
- if err := ctrdutil.AlphaReqToV1Req(r, &v1r); err != nil {
- return nil, errdefs.ToGRPC(err)
- }
- var v1res *runtime.RunPodSandboxResponse
- v1res, err = in.c.RunPodSandbox(ctrdutil.WithNamespace(ctx), &v1r)
- if v1res != nil {
- resp := &runtime_alpha.RunPodSandboxResponse{}
- perr := ctrdutil.V1RespToAlphaResp(v1res, resp)
- if perr == nil {
- res = resp
- } else {
- // actual error has precidence on error returned vs parse error issues
- if err == nil {
- err = perr
- } else {
- // extra log entry if convert response parse error and request error
- log.G(ctx).WithError(perr).Errorf("RunPodSandbox for %+v failed, error", r.GetConfig().GetMetadata())
- }
- }
- }
- return res, errdefs.ToGRPC(err)
-}
-
func (in *instrumentedService) ListPodSandbox(ctx context.Context, r *runtime.ListPodSandboxRequest) (res *runtime.ListPodSandboxResponse, err error) {
if err := in.checkInitialized(); err != nil {
return nil, err
@@ -166,43 +98,6 @@ func (in *instrumentedService) ListPodSandbox(ctx context.Context, r *runtime.Li
return res, errdefs.ToGRPC(err)
}
-func (in *instrumentedAlphaService) ListPodSandbox(ctx context.Context, r *runtime_alpha.ListPodSandboxRequest) (res *runtime_alpha.ListPodSandboxResponse, err error) {
- if err := in.checkInitialized(); err != nil {
- return nil, err
- }
- log.G(ctx).Tracef("ListPodSandbox with filter %+v", r.GetFilter())
- defer func() {
- if err != nil {
- log.G(ctx).WithError(err).Error("ListPodSandbox failed")
- } else {
- log.G(ctx).Tracef("ListPodSandbox returns pod sandboxes %+v", res.GetItems())
- }
- }()
- // converts request and response for earlier CRI version to call and get response from the current version
- var v1r runtime.ListPodSandboxRequest
- if err := ctrdutil.AlphaReqToV1Req(r, &v1r); err != nil {
- return nil, errdefs.ToGRPC(err)
- }
- var v1res *runtime.ListPodSandboxResponse
- v1res, err = in.c.ListPodSandbox(ctrdutil.WithNamespace(ctx), &v1r)
- if v1res != nil {
- resp := &runtime_alpha.ListPodSandboxResponse{}
- perr := ctrdutil.V1RespToAlphaResp(v1res, resp)
- if perr == nil {
- res = resp
- } else {
- // actual error has precidence on error returned vs parse error issues
- if err == nil {
- err = perr
- } else {
- // extra log entry if convert response parse error and request error
- log.G(ctx).WithError(perr).Error("ListPodSandbox failed")
- }
- }
- }
- return res, errdefs.ToGRPC(err)
-}
-
func (in *instrumentedService) PodSandboxStatus(ctx context.Context, r *runtime.PodSandboxStatusRequest) (res *runtime.PodSandboxStatusResponse, err error) {
if err := in.checkInitialized(); err != nil {
return nil, err
@@ -219,43 +114,6 @@ func (in *instrumentedService) PodSandboxStatus(ctx context.Context, r *runtime.
return res, errdefs.ToGRPC(err)
}
-func (in *instrumentedAlphaService) PodSandboxStatus(ctx context.Context, r *runtime_alpha.PodSandboxStatusRequest) (res *runtime_alpha.PodSandboxStatusResponse, err error) {
- if err := in.checkInitialized(); err != nil {
- return nil, err
- }
- log.G(ctx).Tracef("PodSandboxStatus for %q", r.GetPodSandboxId())
- defer func() {
- if err != nil {
- log.G(ctx).WithError(err).Errorf("PodSandboxStatus for %q failed", r.GetPodSandboxId())
- } else {
- log.G(ctx).Tracef("PodSandboxStatus for %q returns status %+v", r.GetPodSandboxId(), res.GetStatus())
- }
- }()
- // converts request and response for earlier CRI version to call and get response from the current version
- var v1r runtime.PodSandboxStatusRequest
- if err := ctrdutil.AlphaReqToV1Req(r, &v1r); err != nil {
- return nil, errdefs.ToGRPC(err)
- }
- var v1res *runtime.PodSandboxStatusResponse
- v1res, err = in.c.PodSandboxStatus(ctrdutil.WithNamespace(ctx), &v1r)
- if v1res != nil {
- resp := &runtime_alpha.PodSandboxStatusResponse{}
- perr := ctrdutil.V1RespToAlphaResp(v1res, resp)
- if perr == nil {
- res = resp
- } else {
- // actual error has precidence on error returned vs parse error issues
- if err == nil {
- err = perr
- } else {
- // extra log entry if convert response parse error and request error
- log.G(ctx).WithError(perr).Errorf("PodSandboxStatus for %q failed", r.GetPodSandboxId())
- }
- }
- }
- return res, errdefs.ToGRPC(err)
-}
-
func (in *instrumentedService) StopPodSandbox(ctx context.Context, r *runtime.StopPodSandboxRequest) (_ *runtime.StopPodSandboxResponse, err error) {
if err := in.checkInitialized(); err != nil {
return nil, err
@@ -272,43 +130,6 @@ func (in *instrumentedService) StopPodSandbox(ctx context.Context, r *runtime.St
return res, errdefs.ToGRPC(err)
}
-func (in *instrumentedAlphaService) StopPodSandbox(ctx context.Context, r *runtime_alpha.StopPodSandboxRequest) (res *runtime_alpha.StopPodSandboxResponse, err error) {
- if err := in.checkInitialized(); err != nil {
- return nil, err
- }
- log.G(ctx).Infof("StopPodSandbox for %q", r.GetPodSandboxId())
- defer func() {
- if err != nil {
- log.G(ctx).WithError(err).Errorf("StopPodSandbox for %q failed", r.GetPodSandboxId())
- } else {
- log.G(ctx).Infof("StopPodSandbox for %q returns successfully", r.GetPodSandboxId())
- }
- }()
- // converts request and response for earlier CRI version to call and get response from the current version
- var v1r runtime.StopPodSandboxRequest
- if err := ctrdutil.AlphaReqToV1Req(r, &v1r); err != nil {
- return nil, errdefs.ToGRPC(err)
- }
- var v1res *runtime.StopPodSandboxResponse
- v1res, err = in.c.StopPodSandbox(ctrdutil.WithNamespace(ctx), &v1r)
- if v1res != nil {
- resp := &runtime_alpha.StopPodSandboxResponse{}
- perr := ctrdutil.V1RespToAlphaResp(v1res, resp)
- if perr == nil {
- res = resp
- } else {
- // actual error has precidence on error returned vs parse error issues
- if err == nil {
- err = perr
- } else {
- // extra log entry if convert response parse error and request error
- log.G(ctx).WithError(perr).Errorf("StopPodSandbox for %q failed", r.GetPodSandboxId())
- }
- }
- }
- return res, errdefs.ToGRPC(err)
-}
-
func (in *instrumentedService) RemovePodSandbox(ctx context.Context, r *runtime.RemovePodSandboxRequest) (_ *runtime.RemovePodSandboxResponse, err error) {
if err := in.checkInitialized(); err != nil {
return nil, err
@@ -325,43 +146,6 @@ func (in *instrumentedService) RemovePodSandbox(ctx context.Context, r *runtime.
return res, errdefs.ToGRPC(err)
}
-func (in *instrumentedAlphaService) RemovePodSandbox(ctx context.Context, r *runtime_alpha.RemovePodSandboxRequest) (res *runtime_alpha.RemovePodSandboxResponse, err error) {
- if err := in.checkInitialized(); err != nil {
- return nil, err
- }
- log.G(ctx).Infof("RemovePodSandbox for %q", r.GetPodSandboxId())
- defer func() {
- if err != nil {
- log.G(ctx).WithError(err).Errorf("RemovePodSandbox for %q failed", r.GetPodSandboxId())
- } else {
- log.G(ctx).Infof("RemovePodSandbox %q returns successfully", r.GetPodSandboxId())
- }
- }()
- // converts request and response for earlier CRI version to call and get response from the current version
- var v1r runtime.RemovePodSandboxRequest
- if err := ctrdutil.AlphaReqToV1Req(r, &v1r); err != nil {
- return nil, errdefs.ToGRPC(err)
- }
- var v1res *runtime.RemovePodSandboxResponse
- v1res, err = in.c.RemovePodSandbox(ctrdutil.WithNamespace(ctx), &v1r)
- if v1res != nil {
- resp := &runtime_alpha.RemovePodSandboxResponse{}
- perr := ctrdutil.V1RespToAlphaResp(v1res, resp)
- if perr == nil {
- res = resp
- } else {
- // actual error has precidence on error returned vs parse error issues
- if err == nil {
- err = perr
- } else {
- // extra log entry if convert response parse error and request error
- log.G(ctx).WithError(perr).Errorf("RemovePodSandbox for %q failed", r.GetPodSandboxId())
- }
- }
- }
- return res, errdefs.ToGRPC(err)
-}
-
func (in *instrumentedService) PortForward(ctx context.Context, r *runtime.PortForwardRequest) (res *runtime.PortForwardResponse, err error) {
if err := in.checkInitialized(); err != nil {
return nil, err
@@ -378,43 +162,6 @@ func (in *instrumentedService) PortForward(ctx context.Context, r *runtime.PortF
return res, errdefs.ToGRPC(err)
}
-func (in *instrumentedAlphaService) PortForward(ctx context.Context, r *runtime_alpha.PortForwardRequest) (res *runtime_alpha.PortForwardResponse, err error) {
- if err := in.checkInitialized(); err != nil {
- return nil, err
- }
- log.G(ctx).Infof("Portforward for %q port %v", r.GetPodSandboxId(), r.GetPort())
- defer func() {
- if err != nil {
- log.G(ctx).WithError(err).Errorf("Portforward for %q failed", r.GetPodSandboxId())
- } else {
- log.G(ctx).Infof("Portforward for %q returns URL %q", r.GetPodSandboxId(), res.GetUrl())
- }
- }()
- // converts request and response for earlier CRI version to call and get response from the current version
- var v1r runtime.PortForwardRequest
- if err := ctrdutil.AlphaReqToV1Req(r, &v1r); err != nil {
- return nil, errdefs.ToGRPC(err)
- }
- var v1res *runtime.PortForwardResponse
- v1res, err = in.c.PortForward(ctrdutil.WithNamespace(ctx), &v1r)
- if v1res != nil {
- resp := &runtime_alpha.PortForwardResponse{}
- perr := ctrdutil.V1RespToAlphaResp(v1res, resp)
- if perr == nil {
- res = resp
- } else {
- // actual error has precidence on error returned vs parse error issues
- if err == nil {
- err = perr
- } else {
- // extra log entry if convert response parse error and request error
- log.G(ctx).WithError(perr).Errorf("Portforward for %q failed", r.GetPodSandboxId())
- }
- }
- }
- return res, errdefs.ToGRPC(err)
-}
-
func (in *instrumentedService) CreateContainer(ctx context.Context, r *runtime.CreateContainerRequest) (res *runtime.CreateContainerResponse, err error) {
if err := in.checkInitialized(); err != nil {
return nil, err
@@ -434,47 +181,6 @@ func (in *instrumentedService) CreateContainer(ctx context.Context, r *runtime.C
return res, errdefs.ToGRPC(err)
}
-func (in *instrumentedAlphaService) CreateContainer(ctx context.Context, r *runtime_alpha.CreateContainerRequest) (res *runtime_alpha.CreateContainerResponse, err error) {
- if err := in.checkInitialized(); err != nil {
- return nil, err
- }
- log.G(ctx).Infof("CreateContainer within sandbox %q for container %+v",
- r.GetPodSandboxId(), r.GetConfig().GetMetadata())
- defer func() {
- if err != nil {
- log.G(ctx).WithError(err).Errorf("CreateContainer within sandbox %q for %+v failed",
- r.GetPodSandboxId(), r.GetConfig().GetMetadata())
- } else {
- log.G(ctx).Infof("CreateContainer within sandbox %q for %+v returns container id %q",
- r.GetPodSandboxId(), r.GetConfig().GetMetadata(), res.GetContainerId())
- }
- }()
- // converts request and response for earlier CRI version to call and get response from the current version
- var v1r runtime.CreateContainerRequest
- if err := ctrdutil.AlphaReqToV1Req(r, &v1r); err != nil {
- return nil, errdefs.ToGRPC(err)
- }
- var v1res *runtime.CreateContainerResponse
- v1res, err = in.c.CreateContainer(ctrdutil.WithNamespace(ctx), &v1r)
- if v1res != nil {
- resp := &runtime_alpha.CreateContainerResponse{}
- perr := ctrdutil.V1RespToAlphaResp(v1res, resp)
- if perr == nil {
- res = resp
- } else {
- // actual error has precidence on error returned vs parse error issues
- if err == nil {
- err = perr
- } else {
- // extra log entry if convert response parse error and request error
- log.G(ctx).WithError(perr).Errorf("CreateContainer within sandbox %q for %+v failed",
- r.GetPodSandboxId(), r.GetConfig().GetMetadata())
- }
- }
- }
- return res, errdefs.ToGRPC(err)
-}
-
func (in *instrumentedService) StartContainer(ctx context.Context, r *runtime.StartContainerRequest) (_ *runtime.StartContainerResponse, err error) {
if err := in.checkInitialized(); err != nil {
return nil, err
@@ -491,43 +197,6 @@ func (in *instrumentedService) StartContainer(ctx context.Context, r *runtime.St
return res, errdefs.ToGRPC(err)
}
-func (in *instrumentedAlphaService) StartContainer(ctx context.Context, r *runtime_alpha.StartContainerRequest) (res *runtime_alpha.StartContainerResponse, err error) {
- if err := in.checkInitialized(); err != nil {
- return nil, err
- }
- log.G(ctx).Infof("StartContainer for %q", r.GetContainerId())
- defer func() {
- if err != nil {
- log.G(ctx).WithError(err).Errorf("StartContainer for %q failed", r.GetContainerId())
- } else {
- log.G(ctx).Infof("StartContainer for %q returns successfully", r.GetContainerId())
- }
- }()
- // converts request and response for earlier CRI version to call and get response from the current version
- var v1r runtime.StartContainerRequest
- if err := ctrdutil.AlphaReqToV1Req(r, &v1r); err != nil {
- return nil, errdefs.ToGRPC(err)
- }
- var v1res *runtime.StartContainerResponse
- v1res, err = in.c.StartContainer(ctrdutil.WithNamespace(ctx), &v1r)
- if v1res != nil {
- resp := &runtime_alpha.StartContainerResponse{}
- perr := ctrdutil.V1RespToAlphaResp(v1res, resp)
- if perr == nil {
- res = resp
- } else {
- // actual error has precidence on error returned vs parse error issues
- if err == nil {
- err = perr
- } else {
- // extra log entry if convert response parse error and request error
- log.G(ctx).WithError(perr).Errorf("StartContainer for %q failed", r.GetContainerId())
- }
- }
- }
- return res, errdefs.ToGRPC(err)
-}
-
func (in *instrumentedService) ListContainers(ctx context.Context, r *runtime.ListContainersRequest) (res *runtime.ListContainersResponse, err error) {
if err := in.checkInitialized(); err != nil {
return nil, err
@@ -545,44 +214,6 @@ func (in *instrumentedService) ListContainers(ctx context.Context, r *runtime.Li
return res, errdefs.ToGRPC(err)
}
-func (in *instrumentedAlphaService) ListContainers(ctx context.Context, r *runtime_alpha.ListContainersRequest) (res *runtime_alpha.ListContainersResponse, err error) {
- if err := in.checkInitialized(); err != nil {
- return nil, err
- }
- log.G(ctx).Tracef("ListContainers with filter %+v", r.GetFilter())
- defer func() {
- if err != nil {
- log.G(ctx).WithError(err).Errorf("ListContainers with filter %+v failed", r.GetFilter())
- } else {
- log.G(ctx).Tracef("ListContainers with filter %+v returns containers %+v",
- r.GetFilter(), res.GetContainers())
- }
- }()
- // converts request and response for earlier CRI version to call and get response from the current version
- var v1r runtime.ListContainersRequest
- if err := ctrdutil.AlphaReqToV1Req(r, &v1r); err != nil {
- return nil, errdefs.ToGRPC(err)
- }
- var v1res *runtime.ListContainersResponse
- v1res, err = in.c.ListContainers(ctrdutil.WithNamespace(ctx), &v1r)
- if v1res != nil {
- resp := &runtime_alpha.ListContainersResponse{}
- perr := ctrdutil.V1RespToAlphaResp(v1res, resp)
- if perr == nil {
- res = resp
- } else {
- // actual error has precidence on error returned vs parse error issues
- if err == nil {
- err = perr
- } else {
- // extra log entry if convert response parse error and request error
- log.G(ctx).WithError(perr).Errorf("ListContainers with filter %+v failed", r.GetFilter())
- }
- }
- }
- return res, errdefs.ToGRPC(err)
-}
-
func (in *instrumentedService) ContainerStatus(ctx context.Context, r *runtime.ContainerStatusRequest) (res *runtime.ContainerStatusResponse, err error) {
if err := in.checkInitialized(); err != nil {
return nil, err
@@ -599,43 +230,6 @@ func (in *instrumentedService) ContainerStatus(ctx context.Context, r *runtime.C
return res, errdefs.ToGRPC(err)
}
-func (in *instrumentedAlphaService) ContainerStatus(ctx context.Context, r *runtime_alpha.ContainerStatusRequest) (res *runtime_alpha.ContainerStatusResponse, err error) {
- if err := in.checkInitialized(); err != nil {
- return nil, err
- }
- log.G(ctx).Tracef("ContainerStatus for %q", r.GetContainerId())
- defer func() {
- if err != nil {
- log.G(ctx).WithError(err).Errorf("ContainerStatus for %q failed", r.GetContainerId())
- } else {
- log.G(ctx).Tracef("ContainerStatus for %q returns status %+v", r.GetContainerId(), res.GetStatus())
- }
- }()
- // converts request and response for earlier CRI version to call and get response from the current version
- var v1r runtime.ContainerStatusRequest
- if err := ctrdutil.AlphaReqToV1Req(r, &v1r); err != nil {
- return nil, errdefs.ToGRPC(err)
- }
- var v1res *runtime.ContainerStatusResponse
- v1res, err = in.c.ContainerStatus(ctrdutil.WithNamespace(ctx), &v1r)
- if v1res != nil {
- resp := &runtime_alpha.ContainerStatusResponse{}
- perr := ctrdutil.V1RespToAlphaResp(v1res, resp)
- if perr == nil {
- res = resp
- } else {
- // actual error has precidence on error returned vs parse error issues
- if err == nil {
- err = perr
- } else {
- // extra log entry if convert response parse error and request error
- log.G(ctx).WithError(perr).Errorf("ContainerStatus for %q failed", r.GetContainerId())
- }
- }
- }
- return res, errdefs.ToGRPC(err)
-}
-
func (in *instrumentedService) StopContainer(ctx context.Context, r *runtime.StopContainerRequest) (res *runtime.StopContainerResponse, err error) {
if err := in.checkInitialized(); err != nil {
return nil, err
@@ -652,43 +246,6 @@ func (in *instrumentedService) StopContainer(ctx context.Context, r *runtime.Sto
return res, errdefs.ToGRPC(err)
}
-func (in *instrumentedAlphaService) StopContainer(ctx context.Context, r *runtime_alpha.StopContainerRequest) (res *runtime_alpha.StopContainerResponse, err error) {
- if err := in.checkInitialized(); err != nil {
- return nil, err
- }
- log.G(ctx).Infof("StopContainer for %q with timeout %d (s)", r.GetContainerId(), r.GetTimeout())
- defer func() {
- if err != nil {
- log.G(ctx).WithError(err).Errorf("StopContainer for %q failed", r.GetContainerId())
- } else {
- log.G(ctx).Infof("StopContainer for %q returns successfully", r.GetContainerId())
- }
- }()
- // converts request and response for earlier CRI version to call and get response from the current version
- var v1r runtime.StopContainerRequest
- if err := ctrdutil.AlphaReqToV1Req(r, &v1r); err != nil {
- return nil, errdefs.ToGRPC(err)
- }
- var v1res *runtime.StopContainerResponse
- v1res, err = in.c.StopContainer(ctrdutil.WithNamespace(ctx), &v1r)
- if v1res != nil {
- resp := &runtime_alpha.StopContainerResponse{}
- perr := ctrdutil.V1RespToAlphaResp(v1res, resp)
- if perr == nil {
- res = resp
- } else {
- // actual error has precidence on error returned vs parse error issues
- if err == nil {
- err = perr
- } else {
- // extra log entry if convert response parse error and request error
- log.G(ctx).WithError(perr).Errorf("StopContainer for %q failed", r.GetContainerId())
- }
- }
- }
- return res, errdefs.ToGRPC(err)
-}
-
func (in *instrumentedService) RemoveContainer(ctx context.Context, r *runtime.RemoveContainerRequest) (res *runtime.RemoveContainerResponse, err error) {
if err := in.checkInitialized(); err != nil {
return nil, err
@@ -705,43 +262,6 @@ func (in *instrumentedService) RemoveContainer(ctx context.Context, r *runtime.R
return res, errdefs.ToGRPC(err)
}
-func (in *instrumentedAlphaService) RemoveContainer(ctx context.Context, r *runtime_alpha.RemoveContainerRequest) (res *runtime_alpha.RemoveContainerResponse, err error) {
- if err := in.checkInitialized(); err != nil {
- return nil, err
- }
- log.G(ctx).Infof("RemoveContainer for %q", r.GetContainerId())
- defer func() {
- if err != nil {
- log.G(ctx).WithError(err).Errorf("RemoveContainer for %q failed", r.GetContainerId())
- } else {
- log.G(ctx).Infof("RemoveContainer for %q returns successfully", r.GetContainerId())
- }
- }()
- // converts request and response for earlier CRI version to call and get response from the current version
- var v1r runtime.RemoveContainerRequest
- if err := ctrdutil.AlphaReqToV1Req(r, &v1r); err != nil {
- return nil, errdefs.ToGRPC(err)
- }
- var v1res *runtime.RemoveContainerResponse
- v1res, err = in.c.RemoveContainer(ctrdutil.WithNamespace(ctx), &v1r)
- if v1res != nil {
- resp := &runtime_alpha.RemoveContainerResponse{}
- perr := ctrdutil.V1RespToAlphaResp(v1res, resp)
- if perr == nil {
- res = resp
- } else {
- // actual error has precidence on error returned vs parse error issues
- if err == nil {
- err = perr
- } else {
- // extra log entry if convert response parse error and request error
- log.G(ctx).WithError(perr).Errorf("RemoveContainer for %q failed", r.GetContainerId())
- }
- }
- }
- return res, errdefs.ToGRPC(err)
-}
-
func (in *instrumentedService) ExecSync(ctx context.Context, r *runtime.ExecSyncRequest) (res *runtime.ExecSyncResponse, err error) {
if err := in.checkInitialized(); err != nil {
return nil, err
@@ -758,43 +278,6 @@ func (in *instrumentedService) ExecSync(ctx context.Context, r *runtime.ExecSync
return res, errdefs.ToGRPC(err)
}
-func (in *instrumentedAlphaService) ExecSync(ctx context.Context, r *runtime_alpha.ExecSyncRequest) (res *runtime_alpha.ExecSyncResponse, err error) {
- if err := in.checkInitialized(); err != nil {
- return nil, err
- }
- log.G(ctx).Debugf("ExecSync for %q with command %+v and timeout %d (s)", r.GetContainerId(), r.GetCmd(), r.GetTimeout())
- defer func() {
- if err != nil {
- log.G(ctx).WithError(err).Errorf("ExecSync for %q failed", r.GetContainerId())
- } else {
- log.G(ctx).Debugf("ExecSync for %q returns with exit code %d", r.GetContainerId(), res.GetExitCode())
- }
- }()
- // converts request and response for earlier CRI version to call and get response from the current version
- var v1r runtime.ExecSyncRequest
- if err := ctrdutil.AlphaReqToV1Req(r, &v1r); err != nil {
- return nil, errdefs.ToGRPC(err)
- }
- var v1res *runtime.ExecSyncResponse
- v1res, err = in.c.ExecSync(ctrdutil.WithNamespace(ctx), &v1r)
- if v1res != nil {
- resp := &runtime_alpha.ExecSyncResponse{}
- perr := ctrdutil.V1RespToAlphaResp(v1res, resp)
- if perr == nil {
- res = resp
- } else {
- // actual error has precidence on error returned vs parse error issues
- if err == nil {
- err = perr
- } else {
- // extra log entry if convert response parse error and request error
- log.G(ctx).WithError(perr).Errorf("ExecSync for %q failed", r.GetContainerId())
- }
- }
- }
- return res, errdefs.ToGRPC(err)
-}
-
func (in *instrumentedService) Exec(ctx context.Context, r *runtime.ExecRequest) (res *runtime.ExecResponse, err error) {
if err := in.checkInitialized(); err != nil {
return nil, err
@@ -812,44 +295,6 @@ func (in *instrumentedService) Exec(ctx context.Context, r *runtime.ExecRequest)
return res, errdefs.ToGRPC(err)
}
-func (in *instrumentedAlphaService) Exec(ctx context.Context, r *runtime_alpha.ExecRequest) (res *runtime_alpha.ExecResponse, err error) {
- if err := in.checkInitialized(); err != nil {
- return nil, err
- }
- log.G(ctx).Debugf("Exec for %q with command %+v, tty %v and stdin %v",
- r.GetContainerId(), r.GetCmd(), r.GetTty(), r.GetStdin())
- defer func() {
- if err != nil {
- log.G(ctx).WithError(err).Errorf("Exec for %q failed", r.GetContainerId())
- } else {
- log.G(ctx).Debugf("Exec for %q returns URL %q", r.GetContainerId(), res.GetUrl())
- }
- }()
- // converts request and response for earlier CRI version to call and get response from the current version
- var v1r runtime.ExecRequest
- if err := ctrdutil.AlphaReqToV1Req(r, &v1r); err != nil {
- return nil, errdefs.ToGRPC(err)
- }
- var v1res *runtime.ExecResponse
- v1res, err = in.c.Exec(ctrdutil.WithNamespace(ctx), &v1r)
- if v1res != nil {
- resp := &runtime_alpha.ExecResponse{}
- perr := ctrdutil.V1RespToAlphaResp(v1res, resp)
- if perr == nil {
- res = resp
- } else {
- // actual error has precidence on error returned vs parse error issues
- if err == nil {
- err = perr
- } else {
- // extra log entry if convert response parse error and request error
- log.G(ctx).WithError(perr).Errorf("Exec for %q failed", r.GetContainerId())
- }
- }
- }
- return res, errdefs.ToGRPC(err)
-}
-
func (in *instrumentedService) Attach(ctx context.Context, r *runtime.AttachRequest) (res *runtime.AttachResponse, err error) {
if err := in.checkInitialized(); err != nil {
return nil, err
@@ -866,43 +311,6 @@ func (in *instrumentedService) Attach(ctx context.Context, r *runtime.AttachRequ
return res, errdefs.ToGRPC(err)
}
-func (in *instrumentedAlphaService) Attach(ctx context.Context, r *runtime_alpha.AttachRequest) (res *runtime_alpha.AttachResponse, err error) {
- if err := in.checkInitialized(); err != nil {
- return nil, err
- }
- log.G(ctx).Debugf("Attach for %q with tty %v and stdin %v", r.GetContainerId(), r.GetTty(), r.GetStdin())
- defer func() {
- if err != nil {
- log.G(ctx).WithError(err).Errorf("Attach for %q failed", r.GetContainerId())
- } else {
- log.G(ctx).Debugf("Attach for %q returns URL %q", r.GetContainerId(), res.Url)
- }
- }()
- // converts request and response for earlier CRI version to call and get response from the current version
- var v1r runtime.AttachRequest
- if err := ctrdutil.AlphaReqToV1Req(r, &v1r); err != nil {
- return nil, errdefs.ToGRPC(err)
- }
- var v1res *runtime.AttachResponse
- v1res, err = in.c.Attach(ctrdutil.WithNamespace(ctx), &v1r)
- if v1res != nil {
- resp := &runtime_alpha.AttachResponse{}
- perr := ctrdutil.V1RespToAlphaResp(v1res, resp)
- if perr == nil {
- res = resp
- } else {
- // actual error has precidence on error returned vs parse error issues
- if err == nil {
- err = perr
- } else {
- // extra log entry if convert response parse error and request error
- log.G(ctx).WithError(perr).Errorf("Attach for %q failed", r.GetContainerId())
- }
- }
- }
- return res, errdefs.ToGRPC(err)
-}
-
func (in *instrumentedService) UpdateContainerResources(ctx context.Context, r *runtime.UpdateContainerResourcesRequest) (res *runtime.UpdateContainerResourcesResponse, err error) {
if err := in.checkInitialized(); err != nil {
return nil, err
@@ -919,43 +327,6 @@ func (in *instrumentedService) UpdateContainerResources(ctx context.Context, r *
return res, errdefs.ToGRPC(err)
}
-func (in *instrumentedAlphaService) UpdateContainerResources(ctx context.Context, r *runtime_alpha.UpdateContainerResourcesRequest) (res *runtime_alpha.UpdateContainerResourcesResponse, err error) {
- if err := in.checkInitialized(); err != nil {
- return nil, err
- }
- log.G(ctx).Infof("UpdateContainerResources for %q with Linux: %+v / Windows: %+v", r.GetContainerId(), r.GetLinux(), r.GetWindows())
- defer func() {
- if err != nil {
- log.G(ctx).WithError(err).Errorf("UpdateContainerResources for %q failed", r.GetContainerId())
- } else {
- log.G(ctx).Infof("UpdateContainerResources for %q returns successfully", r.GetContainerId())
- }
- }()
- // converts request and response for earlier CRI version to call and get response from the current version
- var v1r runtime.UpdateContainerResourcesRequest
- if err := ctrdutil.AlphaReqToV1Req(r, &v1r); err != nil {
- return nil, errdefs.ToGRPC(err)
- }
- var v1res *runtime.UpdateContainerResourcesResponse
- v1res, err = in.c.UpdateContainerResources(ctrdutil.WithNamespace(ctx), &v1r)
- if v1res != nil {
- resp := &runtime_alpha.UpdateContainerResourcesResponse{}
- perr := ctrdutil.V1RespToAlphaResp(v1res, resp)
- if perr == nil {
- res = resp
- } else {
- // actual error has precidence on error returned vs parse error issues
- if err == nil {
- err = perr
- } else {
- // extra log entry if convert response parse error and request error
- log.G(ctx).WithError(perr).Errorf("UpdateContainerResources for %q failed", r.GetContainerId())
- }
- }
- }
- return res, errdefs.ToGRPC(err)
-}
-
func (in *instrumentedService) PullImage(ctx context.Context, r *runtime.PullImageRequest) (res *runtime.PullImageResponse, err error) {
if err := in.checkInitialized(); err != nil {
return nil, err
@@ -976,47 +347,6 @@ func (in *instrumentedService) PullImage(ctx context.Context, r *runtime.PullIma
return res, errdefs.ToGRPC(err)
}
-func (in *instrumentedAlphaService) PullImage(ctx context.Context, r *runtime_alpha.PullImageRequest) (res *runtime_alpha.PullImageResponse, err error) {
- if err := in.checkInitialized(); err != nil {
- return nil, err
- }
- ctx, span := tracing.StartSpan(ctx, tracing.Name(criSpanPrefix, "PullImage"))
- defer span.End()
- log.G(ctx).Infof("PullImage %q", r.GetImage().GetImage())
- defer func() {
- if err != nil {
- log.G(ctx).WithError(err).Errorf("PullImage %q failed", r.GetImage().GetImage())
- } else {
- log.G(ctx).Infof("PullImage %q returns image reference %q",
- r.GetImage().GetImage(), res.GetImageRef())
- }
- span.SetStatus(err)
- }()
- // converts request and response for earlier CRI version to call and get response from the current version
- var v1r runtime.PullImageRequest
- if err := ctrdutil.AlphaReqToV1Req(r, &v1r); err != nil {
- return nil, errdefs.ToGRPC(err)
- }
- var v1res *runtime.PullImageResponse
- v1res, err = in.c.PullImage(ctrdutil.WithNamespace(ctx), &v1r)
- if v1res != nil {
- resp := &runtime_alpha.PullImageResponse{}
- perr := ctrdutil.V1RespToAlphaResp(v1res, resp)
- if perr == nil {
- res = resp
- } else {
- // actual error has precidence on error returned vs parse error issues
- if err == nil {
- err = perr
- } else {
- // extra log entry if convert response parse error and request error
- log.G(ctx).WithError(perr).Errorf("PullImage %q failed", r.GetImage().GetImage())
- }
- }
- }
- return res, errdefs.ToGRPC(err)
-}
-
func (in *instrumentedService) ListImages(ctx context.Context, r *runtime.ListImagesRequest) (res *runtime.ListImagesResponse, err error) {
if err := in.checkInitialized(); err != nil {
return nil, err
@@ -1037,47 +367,6 @@ func (in *instrumentedService) ListImages(ctx context.Context, r *runtime.ListIm
return res, errdefs.ToGRPC(err)
}
-func (in *instrumentedAlphaService) ListImages(ctx context.Context, r *runtime_alpha.ListImagesRequest) (res *runtime_alpha.ListImagesResponse, err error) {
- if err := in.checkInitialized(); err != nil {
- return nil, err
- }
- ctx, span := tracing.StartSpan(ctx, tracing.Name(criSpanPrefix, "ListImages"))
- defer span.End()
- log.G(ctx).Tracef("ListImages with filter %+v", r.GetFilter())
- defer func() {
- if err != nil {
- log.G(ctx).WithError(err).Errorf("ListImages with filter %+v failed", r.GetFilter())
- } else {
- log.G(ctx).Tracef("ListImages with filter %+v returns image list %+v",
- r.GetFilter(), res.GetImages())
- }
- span.SetStatus(err)
- }()
- // converts request and response for earlier CRI version to call and get response from the current version
- var v1r runtime.ListImagesRequest
- if err := ctrdutil.AlphaReqToV1Req(r, &v1r); err != nil {
- return nil, errdefs.ToGRPC(err)
- }
- var v1res *runtime.ListImagesResponse
- v1res, err = in.c.ListImages(ctrdutil.WithNamespace(ctx), &v1r)
- if v1res != nil {
- resp := &runtime_alpha.ListImagesResponse{}
- perr := ctrdutil.V1RespToAlphaResp(v1res, resp)
- if perr == nil {
- res = resp
- } else {
- // actual error has precidence on error returned vs parse error issues
- if err == nil {
- err = perr
- } else {
- // extra log entry if convert response parse error and request error
- log.G(ctx).WithError(perr).Errorf("ListImages with filter %+v failed", r.GetFilter())
- }
- }
- }
- return res, errdefs.ToGRPC(err)
-}
-
func (in *instrumentedService) ImageStatus(ctx context.Context, r *runtime.ImageStatusRequest) (res *runtime.ImageStatusResponse, err error) {
if err := in.checkInitialized(); err != nil {
return nil, err
@@ -1098,47 +387,6 @@ func (in *instrumentedService) ImageStatus(ctx context.Context, r *runtime.Image
return res, errdefs.ToGRPC(err)
}
-func (in *instrumentedAlphaService) ImageStatus(ctx context.Context, r *runtime_alpha.ImageStatusRequest) (res *runtime_alpha.ImageStatusResponse, err error) {
- if err := in.checkInitialized(); err != nil {
- return nil, err
- }
- ctx, span := tracing.StartSpan(ctx, tracing.Name(criSpanPrefix, "ImageStatus"))
- defer span.End()
- log.G(ctx).Tracef("ImageStatus for %q", r.GetImage().GetImage())
- defer func() {
- if err != nil {
- log.G(ctx).WithError(err).Errorf("ImageStatus for %q failed", r.GetImage().GetImage())
- } else {
- log.G(ctx).Tracef("ImageStatus for %q returns image status %+v",
- r.GetImage().GetImage(), res.GetImage())
- }
- span.SetStatus(err)
- }()
- // converts request and response for earlier CRI version to call and get response from the current version
- var v1r runtime.ImageStatusRequest
- if err := ctrdutil.AlphaReqToV1Req(r, &v1r); err != nil {
- return nil, errdefs.ToGRPC(err)
- }
- var v1res *runtime.ImageStatusResponse
- v1res, err = in.c.ImageStatus(ctrdutil.WithNamespace(ctx), &v1r)
- if v1res != nil {
- resp := &runtime_alpha.ImageStatusResponse{}
- perr := ctrdutil.V1RespToAlphaResp(v1res, resp)
- if perr == nil {
- res = resp
- } else {
- // actual error has precidence on error returned vs parse error issues
- if err == nil {
- err = perr
- } else {
- // extra log entry if convert response parse error and request error
- log.G(ctx).WithError(perr).Errorf("ImageStatus for %q failed", r.GetImage().GetImage())
- }
- }
- }
- return res, errdefs.ToGRPC(err)
-}
-
func (in *instrumentedService) RemoveImage(ctx context.Context, r *runtime.RemoveImageRequest) (_ *runtime.RemoveImageResponse, err error) {
if err := in.checkInitialized(); err != nil {
return nil, err
@@ -1158,46 +406,6 @@ func (in *instrumentedService) RemoveImage(ctx context.Context, r *runtime.Remov
return res, errdefs.ToGRPC(err)
}
-func (in *instrumentedAlphaService) RemoveImage(ctx context.Context, r *runtime_alpha.RemoveImageRequest) (res *runtime_alpha.RemoveImageResponse, err error) {
- if err := in.checkInitialized(); err != nil {
- return nil, err
- }
- ctx, span := tracing.StartSpan(ctx, tracing.Name(criSpanPrefix, "RemoveImage"))
- defer span.End()
- log.G(ctx).Infof("RemoveImage %q", r.GetImage().GetImage())
- defer func() {
- if err != nil {
- log.G(ctx).WithError(err).Errorf("RemoveImage %q failed", r.GetImage().GetImage())
- } else {
- log.G(ctx).Infof("RemoveImage %q returns successfully", r.GetImage().GetImage())
- }
- span.SetStatus(err)
- }()
- // converts request and response for earlier CRI version to call and get response from the current version
- var v1r runtime.RemoveImageRequest
- if err := ctrdutil.AlphaReqToV1Req(r, &v1r); err != nil {
- return nil, errdefs.ToGRPC(err)
- }
- var v1res *runtime.RemoveImageResponse
- v1res, err = in.c.RemoveImage(ctrdutil.WithNamespace(ctx), &v1r)
- if v1res != nil {
- resp := &runtime_alpha.RemoveImageResponse{}
- perr := ctrdutil.V1RespToAlphaResp(v1res, resp)
- if perr == nil {
- res = resp
- } else {
- // actual error has precidence on error returned vs parse error issues
- if err == nil {
- err = perr
- } else {
- // extra log entry if convert response parse error and request error
- log.G(ctx).WithError(perr).Errorf("RemoveImage %q failed", r.GetImage().GetImage())
- }
- }
- }
- return res, errdefs.ToGRPC(err)
-}
-
func (in *instrumentedService) ImageFsInfo(ctx context.Context, r *runtime.ImageFsInfoRequest) (res *runtime.ImageFsInfoResponse, err error) {
if err := in.checkInitialized(); err != nil {
return nil, err
@@ -1217,46 +425,6 @@ func (in *instrumentedService) ImageFsInfo(ctx context.Context, r *runtime.Image
return res, errdefs.ToGRPC(err)
}
-func (in *instrumentedAlphaService) ImageFsInfo(ctx context.Context, r *runtime_alpha.ImageFsInfoRequest) (res *runtime_alpha.ImageFsInfoResponse, err error) {
- if err := in.checkInitialized(); err != nil {
- return nil, err
- }
- ctx, span := tracing.StartSpan(ctx, tracing.Name(criSpanPrefix, "ImageFsInfo"))
- defer span.End()
- log.G(ctx).Debugf("ImageFsInfo")
- defer func() {
- if err != nil {
- log.G(ctx).WithError(err).Error("ImageFsInfo failed")
- } else {
- log.G(ctx).Debugf("ImageFsInfo returns filesystem info %+v", res.ImageFilesystems)
- }
- span.SetStatus(err)
- }()
- // converts request and response for earlier CRI version to call and get response from the current version
- var v1r runtime.ImageFsInfoRequest
- if err := ctrdutil.AlphaReqToV1Req(r, &v1r); err != nil {
- return nil, errdefs.ToGRPC(err)
- }
- var v1res *runtime.ImageFsInfoResponse
- v1res, err = in.c.ImageFsInfo(ctrdutil.WithNamespace(ctx), &v1r)
- if v1res != nil {
- resp := &runtime_alpha.ImageFsInfoResponse{}
- perr := ctrdutil.V1RespToAlphaResp(v1res, resp)
- if perr == nil {
- res = resp
- } else {
- // actual error has precidence on error returned vs parse error issues
- if err == nil {
- err = perr
- } else {
- // extra log entry if convert response parse error and request error
- log.G(ctx).WithError(perr).Error("ImageFsInfo failed")
- }
- }
- }
- return res, errdefs.ToGRPC(err)
-}
-
func (in *instrumentedService) PodSandboxStats(ctx context.Context, r *runtime.PodSandboxStatsRequest) (res *runtime.PodSandboxStatsResponse, err error) {
if err := in.checkInitialized(); err != nil {
return nil, err
@@ -1273,43 +441,6 @@ func (in *instrumentedService) PodSandboxStats(ctx context.Context, r *runtime.P
return res, errdefs.ToGRPC(err)
}
-func (in *instrumentedAlphaService) PodSandboxStats(ctx context.Context, r *runtime_alpha.PodSandboxStatsRequest) (res *runtime_alpha.PodSandboxStatsResponse, err error) {
- if err := in.checkInitialized(); err != nil {
- return nil, err
- }
- log.G(ctx).Debugf("PodSandboxStats for %q", r.GetPodSandboxId())
- defer func() {
- if err != nil {
- log.G(ctx).WithError(err).Errorf("PodSandboxStats for %q failed", r.GetPodSandboxId())
- } else {
- log.G(ctx).Debugf("PodSandboxStats for %q returns stats %+v", r.GetPodSandboxId(), res.GetStats())
- }
- }()
- // converts request and response for earlier CRI version to call and get response from the current version
- var v1r runtime.PodSandboxStatsRequest
- if err := ctrdutil.AlphaReqToV1Req(r, &v1r); err != nil {
- return nil, errdefs.ToGRPC(err)
- }
- var v1res *runtime.PodSandboxStatsResponse
- v1res, err = in.c.PodSandboxStats(ctrdutil.WithNamespace(ctx), &v1r)
- if v1res != nil {
- resp := &runtime_alpha.PodSandboxStatsResponse{}
- perr := ctrdutil.V1RespToAlphaResp(v1res, resp)
- if perr == nil {
- res = resp
- } else {
- // actual error has precidence on error returned vs parse error issues
- if err == nil {
- err = perr
- } else {
- // extra log entry if convert response parse error and request error
- log.G(ctx).WithError(err).Errorf("PodSandboxStats for %q failed", r.GetPodSandboxId())
- }
- }
- }
- return res, errdefs.ToGRPC(err)
-}
-
func (in *instrumentedService) ContainerStats(ctx context.Context, r *runtime.ContainerStatsRequest) (res *runtime.ContainerStatsResponse, err error) {
if err := in.checkInitialized(); err != nil {
return nil, err
@@ -1326,43 +457,6 @@ func (in *instrumentedService) ContainerStats(ctx context.Context, r *runtime.Co
return res, errdefs.ToGRPC(err)
}
-func (in *instrumentedAlphaService) ContainerStats(ctx context.Context, r *runtime_alpha.ContainerStatsRequest) (res *runtime_alpha.ContainerStatsResponse, err error) {
- if err := in.checkInitialized(); err != nil {
- return nil, err
- }
- log.G(ctx).Debugf("ContainerStats for %q", r.GetContainerId())
- defer func() {
- if err != nil {
- log.G(ctx).WithError(err).Errorf("ContainerStats for %q failed", r.GetContainerId())
- } else {
- log.G(ctx).Debugf("ContainerStats for %q returns stats %+v", r.GetContainerId(), res.GetStats())
- }
- }()
- // converts request and response for earlier CRI version to call and get response from the current version
- var v1r runtime.ContainerStatsRequest
- if err := ctrdutil.AlphaReqToV1Req(r, &v1r); err != nil {
- return nil, errdefs.ToGRPC(err)
- }
- var v1res *runtime.ContainerStatsResponse
- v1res, err = in.c.ContainerStats(ctrdutil.WithNamespace(ctx), &v1r)
- if v1res != nil {
- resp := &runtime_alpha.ContainerStatsResponse{}
- perr := ctrdutil.V1RespToAlphaResp(v1res, resp)
- if perr == nil {
- res = resp
- } else {
- // actual error has precidence on error returned vs parse error issues
- if err == nil {
- err = perr
- } else {
- // extra log entry if convert response parse error and request error
- log.G(ctx).WithError(perr).Errorf("ContainerStats for %q failed", r.GetContainerId())
- }
- }
- }
- return res, errdefs.ToGRPC(err)
-}
-
func (in *instrumentedService) ListPodSandboxStats(ctx context.Context, r *runtime.ListPodSandboxStatsRequest) (res *runtime.ListPodSandboxStatsResponse, err error) {
if err := in.checkInitialized(); err != nil {
return nil, err
@@ -1379,43 +473,6 @@ func (in *instrumentedService) ListPodSandboxStats(ctx context.Context, r *runti
return res, errdefs.ToGRPC(err)
}
-func (in *instrumentedAlphaService) ListPodSandboxStats(ctx context.Context, r *runtime_alpha.ListPodSandboxStatsRequest) (res *runtime_alpha.ListPodSandboxStatsResponse, err error) {
- if err := in.checkInitialized(); err != nil {
- return nil, err
- }
- log.G(ctx).Tracef("ListPodSandboxStats with filter %+v", r.GetFilter())
- defer func() {
- if err != nil {
- log.G(ctx).WithError(err).Error("ListPodSandboxStats failed")
- } else {
- log.G(ctx).Tracef("ListPodSandboxStats returns stats %+v", res.GetStats())
- }
- }()
- // converts request and response for earlier CRI version to call and get response from the current version
- var v1r runtime.ListPodSandboxStatsRequest
- if err := ctrdutil.AlphaReqToV1Req(r, &v1r); err != nil {
- return nil, errdefs.ToGRPC(err)
- }
- var v1res *runtime.ListPodSandboxStatsResponse
- v1res, err = in.c.ListPodSandboxStats(ctrdutil.WithNamespace(ctx), &v1r)
- if v1res != nil {
- resp := &runtime_alpha.ListPodSandboxStatsResponse{}
- perr := ctrdutil.V1RespToAlphaResp(v1res, resp)
- if perr == nil {
- res = resp
- } else {
- // actual error has precidence on error returned vs parse error issues
- if err == nil {
- err = perr
- } else {
- // extra log entry if convert response parse error and request error
- log.G(ctx).WithError(perr).Error("ListPodSandboxStats failed")
- }
- }
- }
- return res, errdefs.ToGRPC(err)
-}
-
func (in *instrumentedService) ListContainerStats(ctx context.Context, r *runtime.ListContainerStatsRequest) (res *runtime.ListContainerStatsResponse, err error) {
if err := in.checkInitialized(); err != nil {
return nil, err
@@ -1432,43 +489,6 @@ func (in *instrumentedService) ListContainerStats(ctx context.Context, r *runtim
return res, errdefs.ToGRPC(err)
}
-func (in *instrumentedAlphaService) ListContainerStats(ctx context.Context, r *runtime_alpha.ListContainerStatsRequest) (res *runtime_alpha.ListContainerStatsResponse, err error) {
- if err := in.checkInitialized(); err != nil {
- return nil, err
- }
- log.G(ctx).Tracef("ListContainerStats with filter %+v", r.GetFilter())
- defer func() {
- if err != nil {
- log.G(ctx).WithError(err).Error("ListContainerStats failed")
- } else {
- log.G(ctx).Tracef("ListContainerStats returns stats %+v", res.GetStats())
- }
- }()
- // converts request and response for earlier CRI version to call and get response from the current version
- var v1r runtime.ListContainerStatsRequest
- if err := ctrdutil.AlphaReqToV1Req(r, &v1r); err != nil {
- return nil, errdefs.ToGRPC(err)
- }
- var v1res *runtime.ListContainerStatsResponse
- v1res, err = in.c.ListContainerStats(ctrdutil.WithNamespace(ctx), &v1r)
- if v1res != nil {
- resp := &runtime_alpha.ListContainerStatsResponse{}
- perr := ctrdutil.V1RespToAlphaResp(v1res, resp)
- if perr == nil {
- res = resp
- } else {
- // actual error has precidence on error returned vs parse error issues
- if err == nil {
- err = perr
- } else {
- // extra log entry if convert response parse error and request error
- log.G(ctx).WithError(perr).Error("ListContainerStats failed")
- }
- }
- }
- return res, errdefs.ToGRPC(err)
-}
-
func (in *instrumentedService) Status(ctx context.Context, r *runtime.StatusRequest) (res *runtime.StatusResponse, err error) {
if err := in.checkInitialized(); err != nil {
return nil, err
@@ -1485,43 +505,6 @@ func (in *instrumentedService) Status(ctx context.Context, r *runtime.StatusRequ
return res, errdefs.ToGRPC(err)
}
-func (in *instrumentedAlphaService) Status(ctx context.Context, r *runtime_alpha.StatusRequest) (res *runtime_alpha.StatusResponse, err error) {
- if err := in.checkInitialized(); err != nil {
- return nil, err
- }
- log.G(ctx).Tracef("Status")
- defer func() {
- if err != nil {
- log.G(ctx).WithError(err).Error("Status failed")
- } else {
- log.G(ctx).Tracef("Status returns status %+v", res.GetStatus())
- }
- }()
- // converts request and response for earlier CRI version to call and get response from the current version
- var v1r runtime.StatusRequest
- if err := ctrdutil.AlphaReqToV1Req(r, &v1r); err != nil {
- return nil, errdefs.ToGRPC(err)
- }
- var v1res *runtime.StatusResponse
- v1res, err = in.c.Status(ctrdutil.WithNamespace(ctx), &v1r)
- if v1res != nil {
- resp := &runtime_alpha.StatusResponse{}
- perr := ctrdutil.V1RespToAlphaResp(v1res, resp)
- if perr == nil {
- res = resp
- } else {
- // actual error has precidence on error returned vs parse error issues
- if err == nil {
- err = perr
- } else {
- // extra log entry if convert response parse error and request error
- log.G(ctx).WithError(perr).Error("Status failed")
- }
- }
- }
- return res, errdefs.ToGRPC(err)
-}
-
func (in *instrumentedService) Version(ctx context.Context, r *runtime.VersionRequest) (res *runtime.VersionResponse, err error) {
if err := in.checkInitialized(); err != nil {
return nil, err
@@ -1538,22 +521,6 @@ func (in *instrumentedService) Version(ctx context.Context, r *runtime.VersionRe
return res, errdefs.ToGRPC(err)
}
-func (in *instrumentedAlphaService) Version(ctx context.Context, r *runtime_alpha.VersionRequest) (res *runtime_alpha.VersionResponse, err error) {
- if err := in.checkInitialized(); err != nil {
- return nil, err
- }
- log.G(ctx).Tracef("Version with client side version %q", r.GetVersion())
- defer func() {
- if err != nil {
- log.G(ctx).WithError(err).Error("Version failed")
- } else {
- log.G(ctx).Tracef("Version returns %+v", res)
- }
- }()
- res, err = in.c.AlphaVersion(ctrdutil.WithNamespace(ctx), r)
- return res, errdefs.ToGRPC(err)
-}
-
func (in *instrumentedService) UpdateRuntimeConfig(ctx context.Context, r *runtime.UpdateRuntimeConfigRequest) (res *runtime.UpdateRuntimeConfigResponse, err error) {
if err := in.checkInitialized(); err != nil {
return nil, err
@@ -1570,43 +537,6 @@ func (in *instrumentedService) UpdateRuntimeConfig(ctx context.Context, r *runti
return res, errdefs.ToGRPC(err)
}
-func (in *instrumentedAlphaService) UpdateRuntimeConfig(ctx context.Context, r *runtime_alpha.UpdateRuntimeConfigRequest) (res *runtime_alpha.UpdateRuntimeConfigResponse, err error) {
- if err := in.checkInitialized(); err != nil {
- return nil, err
- }
- log.G(ctx).Debugf("UpdateRuntimeConfig with config %+v", r.GetRuntimeConfig())
- defer func() {
- if err != nil {
- log.G(ctx).WithError(err).Error("UpdateRuntimeConfig failed")
- } else {
- log.G(ctx).Debug("UpdateRuntimeConfig returns successfully")
- }
- }()
- // converts request and response for earlier CRI version to call and get response from the current version
- var v1r runtime.UpdateRuntimeConfigRequest
- if err := ctrdutil.AlphaReqToV1Req(r, &v1r); err != nil {
- return nil, errdefs.ToGRPC(err)
- }
- var v1res *runtime.UpdateRuntimeConfigResponse
- v1res, err = in.c.UpdateRuntimeConfig(ctrdutil.WithNamespace(ctx), &v1r)
- if v1res != nil {
- resp := &runtime_alpha.UpdateRuntimeConfigResponse{}
- perr := ctrdutil.V1RespToAlphaResp(v1res, resp)
- if perr == nil {
- res = resp
- } else {
- // actual error has precidence on error returned vs parse error issues
- if err == nil {
- err = perr
- } else {
- // extra log entry if convert response parse error and request error
- log.G(ctx).WithError(perr).Error("UpdateRuntimeConfig failed")
- }
- }
- }
- return res, errdefs.ToGRPC(err)
-}
-
func (in *instrumentedService) ReopenContainerLog(ctx context.Context, r *runtime.ReopenContainerLogRequest) (res *runtime.ReopenContainerLogResponse, err error) {
if err := in.checkInitialized(); err != nil {
return nil, err
@@ -1623,43 +553,6 @@ func (in *instrumentedService) ReopenContainerLog(ctx context.Context, r *runtim
return res, errdefs.ToGRPC(err)
}
-func (in *instrumentedAlphaService) ReopenContainerLog(ctx context.Context, r *runtime_alpha.ReopenContainerLogRequest) (res *runtime_alpha.ReopenContainerLogResponse, err error) {
- if err := in.checkInitialized(); err != nil {
- return nil, err
- }
- log.G(ctx).Debugf("ReopenContainerLog for %q", r.GetContainerId())
- defer func() {
- if err != nil {
- log.G(ctx).WithError(err).Errorf("ReopenContainerLog for %q failed", r.GetContainerId())
- } else {
- log.G(ctx).Debugf("ReopenContainerLog for %q returns successfully", r.GetContainerId())
- }
- }()
- // converts request and response for earlier CRI version to call and get response from the current version
- var v1r runtime.ReopenContainerLogRequest
- if err := ctrdutil.AlphaReqToV1Req(r, &v1r); err != nil {
- return nil, errdefs.ToGRPC(err)
- }
- var v1res *runtime.ReopenContainerLogResponse
- v1res, err = in.c.ReopenContainerLog(ctrdutil.WithNamespace(ctx), &v1r)
- if v1res != nil {
- resp := &runtime_alpha.ReopenContainerLogResponse{}
- perr := ctrdutil.V1RespToAlphaResp(v1res, resp)
- if perr == nil {
- res = resp
- } else {
- // actual error has precidence on error returned vs parse error issues
- if err == nil {
- err = perr
- } else {
- // extra log entry if convert response parse error and request error
- log.G(ctx).WithError(perr).Errorf("ReopenContainerLog for %q failed", r.GetContainerId())
- }
- }
- }
- return res, errdefs.ToGRPC(err)
-}
-
func (in *instrumentedService) CheckpointContainer(ctx context.Context, r *runtime.CheckpointContainerRequest) (res *runtime.CheckpointContainerResponse, err error) {
if err := in.checkInitialized(); err != nil {
return nil, err
diff --git a/pkg/cri/sbserver/service.go b/pkg/cri/sbserver/service.go
index 1967d430e..0c32f6f1f 100644
--- a/pkg/cri/sbserver/service.go
+++ b/pkg/cri/sbserver/service.go
@@ -36,7 +36,6 @@ import (
"github.com/containerd/containerd/pkg/kmutex"
"github.com/containerd/containerd/plugin"
"github.com/containerd/containerd/sandbox"
- runtime_alpha "github.com/containerd/containerd/third_party/k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
"github.com/containerd/go-cni"
"github.com/sirupsen/logrus"
"google.golang.org/grpc"
@@ -348,11 +347,6 @@ func (c *criService) register(s *grpc.Server) error {
instrumented := instrument.NewService(c)
runtime.RegisterRuntimeServiceServer(s, instrumented)
runtime.RegisterImageServiceServer(s, instrumented)
-
- instrumentedAlpha := instrument.NewAlphaService(c)
- runtime_alpha.RegisterRuntimeServiceServer(s, instrumentedAlpha)
- runtime_alpha.RegisterImageServiceServer(s, instrumentedAlpha)
-
return nil
}
diff --git a/pkg/cri/sbserver/version.go b/pkg/cri/sbserver/version.go
index 59fb61bda..7ea9778f3 100644
--- a/pkg/cri/sbserver/version.go
+++ b/pkg/cri/sbserver/version.go
@@ -19,7 +19,6 @@ package sbserver
import (
"context"
- runtime_alpha "github.com/containerd/containerd/third_party/k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
"github.com/containerd/containerd/version"
runtime "k8s.io/cri-api/pkg/apis/runtime/v1"
@@ -42,13 +41,3 @@ 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
-}
diff --git a/pkg/cri/server/service.go b/pkg/cri/server/service.go
index 7937a2358..792342d7d 100644
--- a/pkg/cri/server/service.go
+++ b/pkg/cri/server/service.go
@@ -33,7 +33,6 @@ import (
"github.com/containerd/containerd/pkg/cri/streaming"
"github.com/containerd/containerd/pkg/kmutex"
"github.com/containerd/containerd/plugin"
- runtime_alpha "github.com/containerd/containerd/third_party/k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
cni "github.com/containerd/go-cni"
"github.com/sirupsen/logrus"
"google.golang.org/grpc"
@@ -326,11 +325,6 @@ func (c *criService) register(s *grpc.Server) error {
instrumented := instrument.NewService(c)
runtime.RegisterRuntimeServiceServer(s, instrumented)
runtime.RegisterImageServiceServer(s, instrumented)
-
- instrumentedAlpha := instrument.NewAlphaService(c)
- runtime_alpha.RegisterRuntimeServiceServer(s, instrumentedAlpha)
- runtime_alpha.RegisterImageServiceServer(s, instrumentedAlpha)
-
return nil
}
diff --git a/pkg/cri/server/version.go b/pkg/cri/server/version.go
index fce877aa7..1de600f58 100644
--- a/pkg/cri/server/version.go
+++ b/pkg/cri/server/version.go
@@ -19,7 +19,6 @@ package server
import (
"context"
- runtime_alpha "github.com/containerd/containerd/third_party/k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
"github.com/containerd/containerd/version"
runtime "k8s.io/cri-api/pkg/apis/runtime/v1"
@@ -42,13 +41,3 @@ 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
-}
diff --git a/pkg/cri/util/alpha.go b/pkg/cri/util/alpha.go
deleted file mode 100644
index 80beb6b45..000000000
--- a/pkg/cri/util/alpha.go
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- Copyright The containerd Authors.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
-
-package util
-
-import (
- "github.com/containerd/containerd/protobuf/proto"
- "google.golang.org/protobuf/reflect/protoreflect"
-)
-
-func AlphaReqToV1Req(
- alphar protoreflect.ProtoMessage,
- v1r interface{ Unmarshal(_ []byte) error },
-) error {
- p, err := proto.Marshal(alphar)
- if err != nil {
- return err
- }
-
- if err = v1r.Unmarshal(p); err != nil {
- return err
- }
- return nil
-}
-
-func V1RespToAlphaResp(
- v1res interface{ Marshal() ([]byte, error) },
- alphares protoreflect.ProtoMessage,
-) error {
- p, err := v1res.Marshal()
- if err != nil {
- return err
- }
-
- if err = proto.Unmarshal(p, alphares); err != nil {
- return err
- }
- return nil
-}
diff --git a/script/setup/prepare_env_windows.ps1 b/script/setup/prepare_env_windows.ps1
index 1f5c83856..aaa147de8 100644
--- a/script/setup/prepare_env_windows.ps1
+++ b/script/setup/prepare_env_windows.ps1
@@ -49,7 +49,7 @@ cat c:\Logs\go-env.txt
go install github.com/jstemmer/go-junit-report@v0.9.1
# Get critctl tool. Used for cri-integration tests
-$CRICTL_DOWNLOAD_URL="https://github.com/kubernetes-sigs/cri-tools/releases/download/v1.21.0/crictl-v1.21.0-windows-amd64.tar.gz"
+$CRICTL_DOWNLOAD_URL="https://github.com/kubernetes-sigs/cri-tools/releases/download/v1.26.0/crictl-v1.26.0-windows-amd64.tar.gz"
curl.exe -L $CRICTL_DOWNLOAD_URL -o c:\crictl.tar.gz
tar -xvf c:\crictl.tar.gz
mv crictl.exe "${userGoBin}\crictl.exe" # Move crictl somewhere in path
diff --git a/third_party/k8s.io/cri-api/pkg/apis/runtime/v1alpha2/api.pb.go b/third_party/k8s.io/cri-api/pkg/apis/runtime/v1alpha2/api.pb.go
deleted file mode 100644
index d63a76f77..000000000
--- a/third_party/k8s.io/cri-api/pkg/apis/runtime/v1alpha2/api.pb.go
+++ /dev/null
@@ -1,11909 +0,0 @@
-//
-//Copyright 2018 The Kubernetes Authors.
-//
-//Licensed under the Apache License, Version 2.0 (the "License");
-//you may not use this file except in compliance with the License.
-//You may obtain a copy of the License at
-//
-//http://www.apache.org/licenses/LICENSE-2.0
-//
-//Unless required by applicable law or agreed to in writing, software
-//distributed under the License is distributed on an "AS IS" BASIS,
-//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//See the License for the specific language governing permissions and
-//limitations under the License.
-
-// To regenerate api.pb.go run hack/update-generated-runtime.sh
-
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// versions:
-// protoc-gen-go v1.28.1
-// protoc v3.20.1
-// source: github.com/containerd/containerd/third_party/k8s.io/cri-api/pkg/apis/runtime/v1alpha2/api.proto
-
-package v1alpha2
-
-import (
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
- reflect "reflect"
- sync "sync"
-)
-
-const (
- // Verify that this generated code is sufficiently up-to-date.
- _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
- // Verify that runtime/protoimpl is sufficiently up-to-date.
- _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
-)
-
-type Protocol int32
-
-const (
- Protocol_TCP Protocol = 0
- Protocol_UDP Protocol = 1
- Protocol_SCTP Protocol = 2
-)
-
-// Enum value maps for Protocol.
-var (
- Protocol_name = map[int32]string{
- 0: "TCP",
- 1: "UDP",
- 2: "SCTP",
- }
- Protocol_value = map[string]int32{
- "TCP": 0,
- "UDP": 1,
- "SCTP": 2,
- }
-)
-
-func (x Protocol) Enum() *Protocol {
- p := new(Protocol)
- *p = x
- return p
-}
-
-func (x Protocol) String() string {
- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
-}
-
-func (Protocol) Descriptor() protoreflect.EnumDescriptor {
- return file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_enumTypes[0].Descriptor()
-}
-
-func (Protocol) Type() protoreflect.EnumType {
- return &file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_enumTypes[0]
-}
-
-func (x Protocol) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(x)
-}
-
-// Deprecated: Use Protocol.Descriptor instead.
-func (Protocol) EnumDescriptor() ([]byte, []int) {
- return file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_rawDescGZIP(), []int{0}
-}
-
-type MountPropagation int32
-
-const (
- // No mount propagation ("private" in Linux terminology).
- MountPropagation_PROPAGATION_PRIVATE MountPropagation = 0
- // Mounts get propagated from the host to the container ("rslave" in Linux).
- MountPropagation_PROPAGATION_HOST_TO_CONTAINER MountPropagation = 1
- // Mounts get propagated from the host to the container and from the
- // container to the host ("rshared" in Linux).
- MountPropagation_PROPAGATION_BIDIRECTIONAL MountPropagation = 2
-)
-
-// Enum value maps for MountPropagation.
-var (
- MountPropagation_name = map[int32]string{
- 0: "PROPAGATION_PRIVATE",
- 1: "PROPAGATION_HOST_TO_CONTAINER",
- 2: "PROPAGATION_BIDIRECTIONAL",
- }
- MountPropagation_value = map[string]int32{
- "PROPAGATION_PRIVATE": 0,
- "PROPAGATION_HOST_TO_CONTAINER": 1,
- "PROPAGATION_BIDIRECTIONAL": 2,
- }
-)
-
-func (x MountPropagation) Enum() *MountPropagation {
- p := new(MountPropagation)
- *p = x
- return p
-}
-
-func (x MountPropagation) String() string {
- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
-}
-
-func (MountPropagation) Descriptor() protoreflect.EnumDescriptor {
- return file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_enumTypes[1].Descriptor()
-}
-
-func (MountPropagation) Type() protoreflect.EnumType {
- return &file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_enumTypes[1]
-}
-
-func (x MountPropagation) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(x)
-}
-
-// Deprecated: Use MountPropagation.Descriptor instead.
-func (MountPropagation) EnumDescriptor() ([]byte, []int) {
- return file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_rawDescGZIP(), []int{1}
-}
-
-// A NamespaceMode describes the intended namespace configuration for each
-// of the namespaces (Network, PID, IPC) in NamespaceOption. Runtimes should
-// map these modes as appropriate for the technology underlying the runtime.
-type NamespaceMode int32
-
-const (
- // A POD namespace is common to all containers in a pod.
- // For example, a container with a PID namespace of POD expects to view
- // all of the processes in all of the containers in the pod.
- NamespaceMode_POD NamespaceMode = 0
- // A CONTAINER namespace is restricted to a single container.
- // For example, a container with a PID namespace of CONTAINER expects to
- // view only the processes in that container.
- NamespaceMode_CONTAINER NamespaceMode = 1
- // A NODE namespace is the namespace of the Kubernetes node.
- // For example, a container with a PID namespace of NODE expects to view
- // all of the processes on the host running the kubelet.
- NamespaceMode_NODE NamespaceMode = 2
- // TARGET targets the namespace of another container. When this is specified,
- // a target_id must be specified in NamespaceOption and refer to a container
- // previously created with NamespaceMode CONTAINER. This containers namespace
- // will be made to match that of container target_id.
- // For example, a container with a PID namespace of TARGET expects to view
- // all of the processes that container target_id can view.
- NamespaceMode_TARGET NamespaceMode = 3
-)
-
-// Enum value maps for NamespaceMode.
-var (
- NamespaceMode_name = map[int32]string{
- 0: "POD",
- 1: "CONTAINER",
- 2: "NODE",
- 3: "TARGET",
- }
- NamespaceMode_value = map[string]int32{
- "POD": 0,
- "CONTAINER": 1,
- "NODE": 2,
- "TARGET": 3,
- }
-)
-
-func (x NamespaceMode) Enum() *NamespaceMode {
- p := new(NamespaceMode)
- *p = x
- return p
-}
-
-func (x NamespaceMode) String() string {
- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
-}
-
-func (NamespaceMode) Descriptor() protoreflect.EnumDescriptor {
- return file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_enumTypes[2].Descriptor()
-}
-
-func (NamespaceMode) Type() protoreflect.EnumType {
- return &file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_enumTypes[2]
-}
-
-func (x NamespaceMode) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(x)
-}
-
-// Deprecated: Use NamespaceMode.Descriptor instead.
-func (NamespaceMode) EnumDescriptor() ([]byte, []int) {
- return file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_rawDescGZIP(), []int{2}
-}
-
-type PodSandboxState int32
-
-const (
- PodSandboxState_SANDBOX_READY PodSandboxState = 0
- PodSandboxState_SANDBOX_NOTREADY PodSandboxState = 1
-)
-
-// Enum value maps for PodSandboxState.
-var (
- PodSandboxState_name = map[int32]string{
- 0: "SANDBOX_READY",
- 1: "SANDBOX_NOTREADY",
- }
- PodSandboxState_value = map[string]int32{
- "SANDBOX_READY": 0,
- "SANDBOX_NOTREADY": 1,
- }
-)
-
-func (x PodSandboxState) Enum() *PodSandboxState {
- p := new(PodSandboxState)
- *p = x
- return p
-}
-
-func (x PodSandboxState) String() string {
- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
-}
-
-func (PodSandboxState) Descriptor() protoreflect.EnumDescriptor {
- return file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_enumTypes[3].Descriptor()
-}
-
-func (PodSandboxState) Type() protoreflect.EnumType {
- return &file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_enumTypes[3]
-}
-
-func (x PodSandboxState) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(x)
-}
-
-// Deprecated: Use PodSandboxState.Descriptor instead.
-func (PodSandboxState) EnumDescriptor() ([]byte, []int) {
- return file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_rawDescGZIP(), []int{3}
-}
-
-type ContainerState int32
-
-const (
- ContainerState_CONTAINER_CREATED ContainerState = 0
- ContainerState_CONTAINER_RUNNING ContainerState = 1
- ContainerState_CONTAINER_EXITED ContainerState = 2
- ContainerState_CONTAINER_UNKNOWN ContainerState = 3
-)
-
-// Enum value maps for ContainerState.
-var (
- ContainerState_name = map[int32]string{
- 0: "CONTAINER_CREATED",
- 1: "CONTAINER_RUNNING",
- 2: "CONTAINER_EXITED",
- 3: "CONTAINER_UNKNOWN",
- }
- ContainerState_value = map[string]int32{
- "CONTAINER_CREATED": 0,
- "CONTAINER_RUNNING": 1,
- "CONTAINER_EXITED": 2,
- "CONTAINER_UNKNOWN": 3,
- }
-)
-
-func (x ContainerState) Enum() *ContainerState {
- p := new(ContainerState)
- *p = x
- return p
-}
-
-func (x ContainerState) String() string {
- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
-}
-
-func (ContainerState) Descriptor() protoreflect.EnumDescriptor {
- return file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_enumTypes[4].Descriptor()
-}
-
-func (ContainerState) Type() protoreflect.EnumType {
- return &file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_enumTypes[4]
-}
-
-func (x ContainerState) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(x)
-}
-
-// Deprecated: Use ContainerState.Descriptor instead.
-func (ContainerState) EnumDescriptor() ([]byte, []int) {
- return file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_rawDescGZIP(), []int{4}
-}
-
-// Available profile types.
-type SecurityProfile_ProfileType int32
-
-const (
- // The container runtime default profile should be used.
- SecurityProfile_RuntimeDefault SecurityProfile_ProfileType = 0
- // Disable the feature for the sandbox or the container.
- SecurityProfile_Unconfined SecurityProfile_ProfileType = 1
- // A pre-defined profile on the node should be used.
- SecurityProfile_Localhost SecurityProfile_ProfileType = 2
-)
-
-// Enum value maps for SecurityProfile_ProfileType.
-var (
- SecurityProfile_ProfileType_name = map[int32]string{
- 0: "RuntimeDefault",
- 1: "Unconfined",
- 2: "Localhost",
- }
- SecurityProfile_ProfileType_value = map[string]int32{
- "RuntimeDefault": 0,
- "Unconfined": 1,
- "Localhost": 2,
- }
-)
-
-func (x SecurityProfile_ProfileType) Enum() *SecurityProfile_ProfileType {
- p := new(SecurityProfile_ProfileType)
- *p = x
- return p
-}
-
-func (x SecurityProfile_ProfileType) String() string {
- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
-}
-
-func (SecurityProfile_ProfileType) Descriptor() protoreflect.EnumDescriptor {
- return file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_enumTypes[5].Descriptor()
-}
-
-func (SecurityProfile_ProfileType) Type() protoreflect.EnumType {
- return &file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_enumTypes[5]
-}
-
-func (x SecurityProfile_ProfileType) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(x)
-}
-
-// Deprecated: Use SecurityProfile_ProfileType.Descriptor instead.
-func (SecurityProfile_ProfileType) EnumDescriptor() ([]byte, []int) {
- return file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_rawDescGZIP(), []int{10, 0}
-}
-
-type VersionRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // Version of the kubelet runtime API.
- Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
-}
-
-func (x *VersionRequest) Reset() {
- *x = VersionRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *VersionRequest) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*VersionRequest) ProtoMessage() {}
-
-func (x *VersionRequest) ProtoReflect() protoreflect.Message {
- mi := &file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use VersionRequest.ProtoReflect.Descriptor instead.
-func (*VersionRequest) Descriptor() ([]byte, []int) {
- return file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_rawDescGZIP(), []int{0}
-}
-
-func (x *VersionRequest) GetVersion() string {
- if x != nil {
- return x.Version
- }
- return ""
-}
-
-type VersionResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // Version of the kubelet runtime API.
- Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
- // Name of the container runtime.
- RuntimeName string `protobuf:"bytes,2,opt,name=runtime_name,json=runtimeName,proto3" json:"runtime_name,omitempty"`
- // Version of the container runtime. The string must be
- // semver-compatible.
- RuntimeVersion string `protobuf:"bytes,3,opt,name=runtime_version,json=runtimeVersion,proto3" json:"runtime_version,omitempty"`
- // API version of the container runtime. The string must be
- // semver-compatible.
- RuntimeApiVersion string `protobuf:"bytes,4,opt,name=runtime_api_version,json=runtimeApiVersion,proto3" json:"runtime_api_version,omitempty"`
-}
-
-func (x *VersionResponse) Reset() {
- *x = VersionResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *VersionResponse) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*VersionResponse) ProtoMessage() {}
-
-func (x *VersionResponse) ProtoReflect() protoreflect.Message {
- mi := &file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_msgTypes[1]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use VersionResponse.ProtoReflect.Descriptor instead.
-func (*VersionResponse) Descriptor() ([]byte, []int) {
- return file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_rawDescGZIP(), []int{1}
-}
-
-func (x *VersionResponse) GetVersion() string {
- if x != nil {
- return x.Version
- }
- return ""
-}
-
-func (x *VersionResponse) GetRuntimeName() string {
- if x != nil {
- return x.RuntimeName
- }
- return ""
-}
-
-func (x *VersionResponse) GetRuntimeVersion() string {
- if x != nil {
- return x.RuntimeVersion
- }
- return ""
-}
-
-func (x *VersionResponse) GetRuntimeApiVersion() string {
- if x != nil {
- return x.RuntimeApiVersion
- }
- return ""
-}
-
-// DNSConfig specifies the DNS servers and search domains of a sandbox.
-type DNSConfig struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // List of DNS servers of the cluster.
- Servers []string `protobuf:"bytes,1,rep,name=servers,proto3" json:"servers,omitempty"`
- // List of DNS search domains of the cluster.
- Searches []string `protobuf:"bytes,2,rep,name=searches,proto3" json:"searches,omitempty"`
- // List of DNS options. See https://linux.die.net/man/5/resolv.conf
- // for all available options.
- Options []string `protobuf:"bytes,3,rep,name=options,proto3" json:"options,omitempty"`
-}
-
-func (x *DNSConfig) Reset() {
- *x = DNSConfig{}
- if protoimpl.UnsafeEnabled {
- mi := &file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_msgTypes[2]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *DNSConfig) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*DNSConfig) ProtoMessage() {}
-
-func (x *DNSConfig) ProtoReflect() protoreflect.Message {
- mi := &file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_msgTypes[2]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use DNSConfig.ProtoReflect.Descriptor instead.
-func (*DNSConfig) Descriptor() ([]byte, []int) {
- return file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_rawDescGZIP(), []int{2}
-}
-
-func (x *DNSConfig) GetServers() []string {
- if x != nil {
- return x.Servers
- }
- return nil
-}
-
-func (x *DNSConfig) GetSearches() []string {
- if x != nil {
- return x.Searches
- }
- return nil
-}
-
-func (x *DNSConfig) GetOptions() []string {
- if x != nil {
- return x.Options
- }
- return nil
-}
-
-// PortMapping specifies the port mapping configurations of a sandbox.
-type PortMapping struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // Protocol of the port mapping.
- Protocol Protocol `protobuf:"varint,1,opt,name=protocol,proto3,enum=runtime.v1alpha2.Protocol" json:"protocol,omitempty"`
- // Port number within the container. Default: 0 (not specified).
- ContainerPort int32 `protobuf:"varint,2,opt,name=container_port,json=containerPort,proto3" json:"container_port,omitempty"`
- // Port number on the host. Default: 0 (not specified).
- HostPort int32 `protobuf:"varint,3,opt,name=host_port,json=hostPort,proto3" json:"host_port,omitempty"`
- // Host IP.
- HostIp string `protobuf:"bytes,4,opt,name=host_ip,json=hostIp,proto3" json:"host_ip,omitempty"`
-}
-
-func (x *PortMapping) Reset() {
- *x = PortMapping{}
- if protoimpl.UnsafeEnabled {
- mi := &file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_msgTypes[3]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *PortMapping) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*PortMapping) ProtoMessage() {}
-
-func (x *PortMapping) ProtoReflect() protoreflect.Message {
- mi := &file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_msgTypes[3]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use PortMapping.ProtoReflect.Descriptor instead.
-func (*PortMapping) Descriptor() ([]byte, []int) {
- return file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_rawDescGZIP(), []int{3}
-}
-
-func (x *PortMapping) GetProtocol() Protocol {
- if x != nil {
- return x.Protocol
- }
- return Protocol_TCP
-}
-
-func (x *PortMapping) GetContainerPort() int32 {
- if x != nil {
- return x.ContainerPort
- }
- return 0
-}
-
-func (x *PortMapping) GetHostPort() int32 {
- if x != nil {
- return x.HostPort
- }
- return 0
-}
-
-func (x *PortMapping) GetHostIp() string {
- if x != nil {
- return x.HostIp
- }
- return ""
-}
-
-// Mount specifies a host volume to mount into a container.
-type Mount struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // 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. 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"`
- // If set, the mount needs SELinux relabeling.
- SelinuxRelabel bool `protobuf:"varint,4,opt,name=selinux_relabel,json=selinuxRelabel,proto3" json:"selinux_relabel,omitempty"`
- // Requested propagation mode.
- Propagation MountPropagation `protobuf:"varint,5,opt,name=propagation,proto3,enum=runtime.v1alpha2.MountPropagation" json:"propagation,omitempty"`
-}
-
-func (x *Mount) Reset() {
- *x = Mount{}
- if protoimpl.UnsafeEnabled {
- mi := &file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_msgTypes[4]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *Mount) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*Mount) ProtoMessage() {}
-
-func (x *Mount) ProtoReflect() protoreflect.Message {
- mi := &file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_msgTypes[4]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use Mount.ProtoReflect.Descriptor instead.
-func (*Mount) Descriptor() ([]byte, []int) {
- return file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_rawDescGZIP(), []int{4}
-}
-
-func (x *Mount) GetContainerPath() string {
- if x != nil {
- return x.ContainerPath
- }
- return ""
-}
-
-func (x *Mount) GetHostPath() string {
- if x != nil {
- return x.HostPath
- }
- return ""
-}
-
-func (x *Mount) GetReadonly() bool {
- if x != nil {
- return x.Readonly
- }
- return false
-}
-
-func (x *Mount) GetSelinuxRelabel() bool {
- if x != nil {
- return x.SelinuxRelabel
- }
- return false
-}
-
-func (x *Mount) GetPropagation() MountPropagation {
- if x != nil {
- return x.Propagation
- }
- return MountPropagation_PROPAGATION_PRIVATE
-}
-
-// IDMapping describes host to container ID mappings for a pod sandbox.
-type IDMapping struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // HostId is the id on the host.
- HostId uint32 `protobuf:"varint,1,opt,name=host_id,json=hostId,proto3" json:"host_id,omitempty"`
- // ContainerId is the id in the container.
- ContainerId uint32 `protobuf:"varint,2,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
- // Length is the size of the range to map.
- Length uint32 `protobuf:"varint,3,opt,name=length,proto3" json:"length,omitempty"`
-}
-
-func (x *IDMapping) Reset() {
- *x = IDMapping{}
- if protoimpl.UnsafeEnabled {
- mi := &file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_msgTypes[5]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *IDMapping) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*IDMapping) ProtoMessage() {}
-
-func (x *IDMapping) ProtoReflect() protoreflect.Message {
- mi := &file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_msgTypes[5]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use IDMapping.ProtoReflect.Descriptor instead.
-func (*IDMapping) Descriptor() ([]byte, []int) {
- return file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_rawDescGZIP(), []int{5}
-}
-
-func (x *IDMapping) GetHostId() uint32 {
- if x != nil {
- return x.HostId
- }
- return 0
-}
-
-func (x *IDMapping) GetContainerId() uint32 {
- if x != nil {
- return x.ContainerId
- }
- return 0
-}
-
-func (x *IDMapping) GetLength() uint32 {
- if x != nil {
- return x.Length
- }
- return 0
-}
-
-// UserNamespace describes the intended user namespace configuration for a pod sandbox.
-type UserNamespace struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // Mode is the NamespaceMode for this UserNamespace.
- // Note: NamespaceMode for UserNamespace currently supports only POD and NODE, not CONTAINER OR TARGET.
- Mode NamespaceMode `protobuf:"varint,1,opt,name=mode,proto3,enum=runtime.v1alpha2.NamespaceMode" json:"mode,omitempty"`
- // Uids specifies the UID mappings for the user namespace.
- Uids []*IDMapping `protobuf:"bytes,2,rep,name=uids,proto3" json:"uids,omitempty"`
- // Gids specifies the GID mappings for the user namespace.
- Gids []*IDMapping `protobuf:"bytes,3,rep,name=gids,proto3" json:"gids,omitempty"`
-}
-
-func (x *UserNamespace) Reset() {
- *x = UserNamespace{}
- if protoimpl.UnsafeEnabled {
- mi := &file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_msgTypes[6]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *UserNamespace) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*UserNamespace) ProtoMessage() {}
-
-func (x *UserNamespace) ProtoReflect() protoreflect.Message {
- mi := &file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_msgTypes[6]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use UserNamespace.ProtoReflect.Descriptor instead.
-func (*UserNamespace) Descriptor() ([]byte, []int) {
- return file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_rawDescGZIP(), []int{6}
-}
-
-func (x *UserNamespace) GetMode() NamespaceMode {
- if x != nil {
- return x.Mode
- }
- return NamespaceMode_POD
-}
-
-func (x *UserNamespace) GetUids() []*IDMapping {
- if x != nil {
- return x.Uids
- }
- return nil
-}
-
-func (x *UserNamespace) GetGids() []*IDMapping {
- if x != nil {
- return x.Gids
- }
- return nil
-}
-
-// NamespaceOption provides options for Linux namespaces.
-type NamespaceOption struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // Network namespace for this container/sandbox.
- // Note: There is currently no way to set CONTAINER scoped network in the Kubernetes API.
- // Namespaces currently set by the kubelet: POD, NODE
- Network NamespaceMode `protobuf:"varint,1,opt,name=network,proto3,enum=runtime.v1alpha2.NamespaceMode" json:"network,omitempty"`
- // PID namespace for this container/sandbox.
- // Note: The CRI default is POD, but the v1.PodSpec default is CONTAINER.
- // The kubelet's runtime manager will set this to CONTAINER explicitly for v1 pods.
- // Namespaces currently set by the kubelet: POD, CONTAINER, NODE, TARGET
- Pid NamespaceMode `protobuf:"varint,2,opt,name=pid,proto3,enum=runtime.v1alpha2.NamespaceMode" json:"pid,omitempty"`
- // IPC namespace for this container/sandbox.
- // Note: There is currently no way to set CONTAINER scoped IPC in the Kubernetes API.
- // Namespaces currently set by the kubelet: POD, NODE
- Ipc NamespaceMode `protobuf:"varint,3,opt,name=ipc,proto3,enum=runtime.v1alpha2.NamespaceMode" json:"ipc,omitempty"`
- // Target Container ID for NamespaceMode of TARGET. This container must have been
- // previously created in the same pod. It is not possible to specify different targets
- // for each namespace.
- TargetId string `protobuf:"bytes,4,opt,name=target_id,json=targetId,proto3" json:"target_id,omitempty"`
- // UsernsOptions for this pod sandbox.
- // The Kubelet picks the user namespace configuration to use for the pod sandbox. The mappings
- // are specified as part of the UserNamespace struct. If the struct is nil, then the POD mode
- // must be assumed. This is done for backward compatibility with older Kubelet versions that
- // do not set a user namespace.
- UsernsOptions *UserNamespace `protobuf:"bytes,5,opt,name=userns_options,json=usernsOptions,proto3" json:"userns_options,omitempty"`
-}
-
-func (x *NamespaceOption) Reset() {
- *x = NamespaceOption{}
- if protoimpl.UnsafeEnabled {
- mi := &file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_msgTypes[7]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *NamespaceOption) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*NamespaceOption) ProtoMessage() {}
-
-func (x *NamespaceOption) ProtoReflect() protoreflect.Message {
- mi := &file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_msgTypes[7]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use NamespaceOption.ProtoReflect.Descriptor instead.
-func (*NamespaceOption) Descriptor() ([]byte, []int) {
- return file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_rawDescGZIP(), []int{7}
-}
-
-func (x *NamespaceOption) GetNetwork() NamespaceMode {
- if x != nil {
- return x.Network
- }
- return NamespaceMode_POD
-}
-
-func (x *NamespaceOption) GetPid() NamespaceMode {
- if x != nil {
- return x.Pid
- }
- return NamespaceMode_POD
-}
-
-func (x *NamespaceOption) GetIpc() NamespaceMode {
- if x != nil {
- return x.Ipc
- }
- return NamespaceMode_POD
-}
-
-func (x *NamespaceOption) GetTargetId() string {
- if x != nil {
- return x.TargetId
- }
- return ""
-}
-
-func (x *NamespaceOption) GetUsernsOptions() *UserNamespace {
- if x != nil {
- return x.UsernsOptions
- }
- return nil
-}
-
-// Int64Value is the wrapper of int64.
-type Int64Value struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // The value.
- Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
-}
-
-func (x *Int64Value) Reset() {
- *x = Int64Value{}
- if protoimpl.UnsafeEnabled {
- mi := &file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_msgTypes[8]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *Int64Value) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*Int64Value) ProtoMessage() {}
-
-func (x *Int64Value) ProtoReflect() protoreflect.Message {
- mi := &file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_msgTypes[8]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use Int64Value.ProtoReflect.Descriptor instead.
-func (*Int64Value) Descriptor() ([]byte, []int) {
- return file_github_com_containerd_containerd_third_party_k8s_io_cri_api_pkg_apis_runtime_v1alpha2_api_proto_rawDescGZIP(), []int{8}
-}
-
-func (x *Int64Value) GetValue() int64 {
- if x != nil {
- return x.Value
- }
- return 0
-}
-
-// LinuxSandboxSecurityContext holds linux security configuration that will be
-// applied to a sandbox. Note that:
-// 1. It does not apply to containers in the pods.
-// 2. It may not be applicable to a PodSandbox which does not contain any running
-// process.
-type LinuxSandboxSecurityContext struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // Configurations for the sandbox's namespaces.
- // This will be used only if the PodSandbox uses namespace for isolation.
- NamespaceOptions *NamespaceOption `protobuf:"bytes,1,opt,name=namespace_options,json=namespaceOptions,proto3" json:"namespace_options,omitempty"`
- // Optional SELinux context to be applied.
- SelinuxOptions *SELinuxOption `protobuf:"bytes,2,opt,name=selinux_options,json=selinuxOptions,proto3" json:"selinux_options,omitempty"`
- // UID to run sandbox processes as, when applicable.
- RunAsUser *Int64Value `protobuf:"bytes,3,opt,name=run_as_user,json=runAsUser,proto3" json:"run_as_user,omitempty"`
- // GID to run sandbox processes as, when applicable. run_as_group should only
- // be specified when run_as_user is specified; otherwise, the runtime MUST error.
- RunAsGroup *Int64Value `protobuf:"bytes,8,opt,name=run_as_group,json=runAsGroup,proto3" json:"run_as_group,omitempty"`
- // If set, the root filesystem of the sandbox is read-only.
- ReadonlyRootfs bool `protobuf:"varint,4,opt,name=readonly_rootfs,json=readonlyRootfs,proto3" json:"readonly_rootfs,omitempty"`
- // List of groups applied to the first process run in the sandbox, in
- // addition to the sandbox's primary GID.
- SupplementalGroups []int64 `protobuf:"varint,5,rep,packed,name=supplemental_groups,json=supplementalGroups,proto3" json:"supplemental_groups,omitempty"`
- // Indicates whether the sandbox will be asked to run a privileged
- // container. If a privileged container is to be executed within it, this
- // MUST be true.
- // This allows a sandbox to take additional security precautions if no
- // privileged containers are expected to be run.
- Privileged bool `protobuf:"varint,6,opt,name=privileged,proto3" json:"privileged,omitempty"`
- // Seccomp profile for the sandbox.
- Seccomp *SecurityProfile `protobuf:"bytes,9,opt,name=seccomp,proto3" json:"seccomp,omitempty"`
- // AppArmor profile for the sandbox.
- Apparmor *SecurityProfile `protobuf:"bytes,10,opt,name=apparmor,proto3" json:"apparmor,omitempty"`
- // Seccomp profile for the sandbox, candidate values are:
- // - runtime/default: the default profile for the container runtime
- // - unconfined: unconfined profile, ie, no seccomp sandboxing
- // - localhost/