Skip to content

Commit

Permalink
stub RuntimeConfig method
Browse files Browse the repository at this point in the history
Signed-off-by: galal-hussein <[email protected]>
  • Loading branch information
galal-hussein authored and brandond committed May 17, 2024
1 parent 09cd2a3 commit f985b17
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/cri/instrument/instrumented_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,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"
runtime "k8s.io/cri-api/pkg/apis/runtime/v1"

ctrdutil "github.com/containerd/containerd/pkg/cri/util"
Expand Down Expand Up @@ -1745,3 +1747,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")
}
7 changes: 7 additions & 0 deletions pkg/cri/sbserver/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package sbserver

import (
"context"
"encoding/json"
"fmt"
"io"
Expand All @@ -40,6 +41,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"
Expand Down Expand Up @@ -410,3 +413,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")
}
6 changes: 6 additions & 0 deletions pkg/cri/server/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,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"
Expand Down Expand Up @@ -425,3 +427,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")
}

0 comments on commit f985b17

Please sign in to comment.