Skip to content

Commit 0279aae

Browse files
galal-husseinbrandond
authored andcommitted
stub RuntimeConfig method
Signed-off-by: galal-hussein <[email protected]>
1 parent 9d7f39c commit 0279aae

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

pkg/cri/instrument/instrumented_service.go

+5
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ import (
2626
"github.com/containerd/containerd/tracing"
2727
"github.com/containerd/errdefs"
2828
"github.com/containerd/log"
29+
"google.golang.org/grpc/codes"
30+
"google.golang.org/grpc/status"
2931
runtime "k8s.io/cri-api/pkg/apis/runtime/v1"
3032

3133
ctrdutil "github.com/containerd/containerd/pkg/cri/util"
@@ -1745,3 +1747,6 @@ func (in *instrumentedService) ListPodSandboxMetrics(ctx context.Context, r *run
17451747
res, err = in.c.ListPodSandboxMetrics(ctx, r)
17461748
return res, errdefs.ToGRPC(err)
17471749
}
1750+
func (in *instrumentedService) RuntimeConfig(ctx context.Context, r *runtime.RuntimeConfigRequest) (res *runtime.RuntimeConfigResponse, err error) {
1751+
return nil, status.Errorf(codes.Unimplemented, "method RuntimeConfig not implemented")
1752+
}

pkg/cri/sbserver/service.go

+7
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package sbserver
1818

1919
import (
20+
"context"
2021
"encoding/json"
2122
"fmt"
2223
"io"
@@ -41,6 +42,8 @@ import (
4142
"github.com/containerd/go-cni"
4243
"github.com/sirupsen/logrus"
4344
"google.golang.org/grpc"
45+
"google.golang.org/grpc/codes"
46+
"google.golang.org/grpc/status"
4447
runtime "k8s.io/cri-api/pkg/apis/runtime/v1"
4548

4649
"github.com/containerd/containerd/pkg/cri/store/label"
@@ -411,3 +414,7 @@ func ValidateMode(modeStr string) error {
411414
return fmt.Errorf("unknown sandbox controller mode: %s", modeStr)
412415
}
413416
}
417+
418+
func (in *criService) RuntimeConfig(ctx context.Context, r *runtime.RuntimeConfigRequest) (res *runtime.RuntimeConfigResponse, err error) {
419+
return nil, status.Errorf(codes.Unimplemented, "method RuntimeConfig not implemented")
420+
}

pkg/cri/server/service.go

+6
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ import (
4141
cni "github.com/containerd/go-cni"
4242
"github.com/sirupsen/logrus"
4343
"google.golang.org/grpc"
44+
"google.golang.org/grpc/codes"
45+
"google.golang.org/grpc/status"
4446
runtime "k8s.io/cri-api/pkg/apis/runtime/v1"
4547

4648
"github.com/containerd/containerd/pkg/cri/store/label"
@@ -426,3 +428,7 @@ func loadBaseOCISpecs(config *criconfig.Config) (map[string]*oci.Spec, error) {
426428

427429
return specs, nil
428430
}
431+
432+
func (in *criService) RuntimeConfig(ctx context.Context, r *runtime.RuntimeConfigRequest) (res *runtime.RuntimeConfigResponse, err error) {
433+
return nil, status.Errorf(codes.Unimplemented, "method RuntimeConfig not implemented")
434+
}

0 commit comments

Comments
 (0)