From 7c80407d8c91c6d70583e1db87abca4e4f92a5c2 Mon Sep 17 00:00:00 2001 From: galal-hussein Date: Thu, 17 Aug 2023 00:05:24 +0300 Subject: [PATCH] stub RuntimeConfig method Signed-off-by: galal-hussein --- pkg/cri/instrument/instrumented_service.go | 5 +++++ pkg/cri/sbserver/service.go | 7 +++++++ pkg/cri/server/service.go | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/pkg/cri/instrument/instrumented_service.go b/pkg/cri/instrument/instrumented_service.go index 826837c3e32e..e65206a827b9 100644 --- a/pkg/cri/instrument/instrumented_service.go +++ b/pkg/cri/instrument/instrumented_service.go @@ -28,6 +28,8 @@ import ( "github.com/containerd/containerd/services/warning" runtime_alpha "github.com/containerd/containerd/third_party/k8s.io/cri-api/pkg/apis/runtime/v1alpha2" "github.com/containerd/containerd/tracing" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ctrdutil "github.com/containerd/containerd/pkg/cri/util" "github.com/containerd/containerd/pkg/deprecation" @@ -1746,3 +1748,6 @@ func (in *instrumentedService) ListPodSandboxMetrics(ctx context.Context, r *run res, err = in.c.ListPodSandboxMetrics(ctx, r) return res, errdefs.ToGRPC(err) } +func (in *instrumentedService) RuntimeConfig(ctx context.Context, r *runtime.RuntimeConfigRequest) (res *runtime.RuntimeConfigResponse, err error) { + return nil, status.Errorf(codes.Unimplemented, "method RuntimeConfig not implemented") +} diff --git a/pkg/cri/sbserver/service.go b/pkg/cri/sbserver/service.go index c01943535407..6bd2a937c865 100644 --- a/pkg/cri/sbserver/service.go +++ b/pkg/cri/sbserver/service.go @@ -17,6 +17,7 @@ package sbserver import ( + "context" "encoding/json" "fmt" "io" @@ -41,6 +42,8 @@ import ( "github.com/containerd/go-cni" "github.com/sirupsen/logrus" "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" runtime "k8s.io/cri-api/pkg/apis/runtime/v1" "github.com/containerd/containerd/pkg/cri/store/label" @@ -411,3 +414,7 @@ func ValidateMode(modeStr string) error { return fmt.Errorf("unknown sandbox controller mode: %s", modeStr) } } + +func (in *criService) RuntimeConfig(ctx context.Context, r *runtime.RuntimeConfigRequest) (res *runtime.RuntimeConfigResponse, err error) { + return nil, status.Errorf(codes.Unimplemented, "method RuntimeConfig not implemented") +} diff --git a/pkg/cri/server/service.go b/pkg/cri/server/service.go index f5caa68d4b4b..e7e7d5ac9355 100644 --- a/pkg/cri/server/service.go +++ b/pkg/cri/server/service.go @@ -41,6 +41,8 @@ import ( cni "github.com/containerd/go-cni" "github.com/sirupsen/logrus" "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" runtime "k8s.io/cri-api/pkg/apis/runtime/v1" "github.com/containerd/containerd/pkg/cri/store/label" @@ -426,3 +428,7 @@ func loadBaseOCISpecs(config *criconfig.Config) (map[string]*oci.Spec, error) { return specs, nil } + +func (in *criService) RuntimeConfig(ctx context.Context, r *runtime.RuntimeConfigRequest) (res *runtime.RuntimeConfigResponse, err error) { + return nil, status.Errorf(codes.Unimplemented, "method RuntimeConfig not implemented") +}