resolve lint issue upstreamcri.NewRemoteImageService() is deprecated

Signed-off-by: Mike Brown <brownwm@us.ibm.com>
This commit is contained in:
Mike Brown committed 2026-08-27 15:24:24 -05:00
1 parent ee09726316
commit 00ecad3d7a
2 files changed
+12 -2

No files matched your search

+6 -1
View File
@@ -52,7 +52,12 @@ type ImageService struct {
// NewImageService creates a legacy-style CRI image client backed by the
// upstream Kubernetes CRI client.
func NewImageService(endpoint string, connectionTimeout time.Duration) (*ImageService, error) {
imageService, err := upstreamcri.NewRemoteImageService(context.Background(), endpoint, connectionTimeout, nil, false)
imageService, err := upstreamcri.NewRemoteImageServiceBuilder().
WithEndpoint(endpoint).
WithConnectionTimeout(connectionTimeout).
WithTracerProvider(nil).
WithUseStreaming(false).
Build(context.Background())
if err != nil {
return nil, err
}
+6 -1
View File
@@ -59,7 +59,12 @@ type RuntimeService struct {
// NewRuntimeService creates a legacy-style CRI runtime client backed by the
// upstream Kubernetes CRI client.
func NewRuntimeService(endpoint string, connectionTimeout time.Duration) (*RuntimeService, error) {
runtimeService, err := upstreamcri.NewRemoteRuntimeService(context.Background(), endpoint, connectionTimeout, nil, false)
runtimeService, err := upstreamcri.NewRemoteRuntimeServiceBuilder().
WithEndpoint(endpoint).
WithConnectionTimeout(connectionTimeout).
WithTracerProvider(nil).
WithUseStreaming(false).
Build(context.Background())
if err != nil {
return nil, err
}