From f60a4a2718b2f01a8e6029ddecbf8a76fefb9351 Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Mon, 19 Jun 2023 13:12:49 +0300 Subject: [PATCH] cri: drop unused arg from generateRuntimeOptions Signed-off-by: Markus Lehtonen --- pkg/cri/sbserver/helpers.go | 2 +- pkg/cri/sbserver/helpers_test.go | 2 +- pkg/cri/sbserver/sandbox_run.go | 2 +- pkg/cri/server/helpers.go | 2 +- pkg/cri/server/helpers_test.go | 2 +- pkg/cri/server/sandbox_run.go | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/cri/sbserver/helpers.go b/pkg/cri/sbserver/helpers.go index 37cdb019f..c4d39c401 100644 --- a/pkg/cri/sbserver/helpers.go +++ b/pkg/cri/sbserver/helpers.go @@ -262,7 +262,7 @@ func buildLabels(configLabels, imageConfigLabels map[string]string, containerTyp } // generateRuntimeOptions generates runtime options from cri plugin config. -func generateRuntimeOptions(r criconfig.Runtime, c criconfig.Config) (interface{}, error) { +func generateRuntimeOptions(r criconfig.Runtime) (interface{}, error) { if r.Options == nil { return nil, nil } diff --git a/pkg/cri/sbserver/helpers_test.go b/pkg/cri/sbserver/helpers_test.go index 429dc040f..25426c354 100644 --- a/pkg/cri/sbserver/helpers_test.go +++ b/pkg/cri/sbserver/helpers_test.go @@ -178,7 +178,7 @@ systemd_cgroup = true } { test := test t.Run(test.desc, func(t *testing.T) { - opts, err := generateRuntimeOptions(test.r, test.c) + opts, err := generateRuntimeOptions(test.r) assert.NoError(t, err) assert.Equal(t, test.expectedOptions, opts) }) diff --git a/pkg/cri/sbserver/sandbox_run.go b/pkg/cri/sbserver/sandbox_run.go index c168fd31d..d09b38dcd 100644 --- a/pkg/cri/sbserver/sandbox_run.go +++ b/pkg/cri/sbserver/sandbox_run.go @@ -95,7 +95,7 @@ func (c *criService) RunPodSandbox(ctx context.Context, r *runtime.RunPodSandbox sandboxInfo.Runtime.Name = ociRuntime.Type // Retrieve runtime options - runtimeOpts, err := generateRuntimeOptions(ociRuntime, c.config) + runtimeOpts, err := generateRuntimeOptions(ociRuntime) if err != nil { return nil, fmt.Errorf("failed to generate sandbox runtime options: %w", err) } diff --git a/pkg/cri/server/helpers.go b/pkg/cri/server/helpers.go index eeac1695d..2b42538d4 100644 --- a/pkg/cri/server/helpers.go +++ b/pkg/cri/server/helpers.go @@ -332,7 +332,7 @@ func parseImageReferences(refs []string) ([]string, []string) { } // generateRuntimeOptions generates runtime options from cri plugin config. -func generateRuntimeOptions(r criconfig.Runtime, c criconfig.Config) (interface{}, error) { +func generateRuntimeOptions(r criconfig.Runtime) (interface{}, error) { if r.Options == nil { return nil, nil } diff --git a/pkg/cri/server/helpers_test.go b/pkg/cri/server/helpers_test.go index b47152b83..13376f7d6 100644 --- a/pkg/cri/server/helpers_test.go +++ b/pkg/cri/server/helpers_test.go @@ -281,7 +281,7 @@ func TestGenerateRuntimeOptions(t *testing.T) { } { test := test t.Run(test.desc, func(t *testing.T) { - opts, err := generateRuntimeOptions(test.r, test.c) + opts, err := generateRuntimeOptions(test.r) assert.NoError(t, err) assert.Equal(t, test.expectedOptions, opts) }) diff --git a/pkg/cri/server/sandbox_run.go b/pkg/cri/server/sandbox_run.go index 40cf75858..55e14e5a8 100644 --- a/pkg/cri/server/sandbox_run.go +++ b/pkg/cri/server/sandbox_run.go @@ -152,7 +152,7 @@ func (c *criService) RunPodSandbox(ctx context.Context, r *runtime.RunPodSandbox sandboxLabels := buildLabels(config.Labels, image.ImageSpec.Config.Labels, containerKindSandbox) - runtimeOpts, err := generateRuntimeOptions(ociRuntime, c.config) + runtimeOpts, err := generateRuntimeOptions(ociRuntime) if err != nil { return nil, fmt.Errorf("failed to generate runtime options: %w", err) }