cri: drop unused arg from generateRuntimeOptions

Signed-off-by: Markus Lehtonen <markus.lehtonen@intel.com>
This commit is contained in:
Markus Lehtonen 2023-06-19 13:12:49 +03:00
parent 96de54db43
commit f60a4a2718
6 changed files with 6 additions and 6 deletions

View File

@ -262,7 +262,7 @@ func buildLabels(configLabels, imageConfigLabels map[string]string, containerTyp
} }
// generateRuntimeOptions generates runtime options from cri plugin config. // 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 { if r.Options == nil {
return nil, nil return nil, nil
} }

View File

@ -178,7 +178,7 @@ systemd_cgroup = true
} { } {
test := test test := test
t.Run(test.desc, func(t *testing.T) { 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.NoError(t, err)
assert.Equal(t, test.expectedOptions, opts) assert.Equal(t, test.expectedOptions, opts)
}) })

View File

@ -95,7 +95,7 @@ func (c *criService) RunPodSandbox(ctx context.Context, r *runtime.RunPodSandbox
sandboxInfo.Runtime.Name = ociRuntime.Type sandboxInfo.Runtime.Name = ociRuntime.Type
// Retrieve runtime options // Retrieve runtime options
runtimeOpts, err := generateRuntimeOptions(ociRuntime, c.config) runtimeOpts, err := generateRuntimeOptions(ociRuntime)
if err != nil { if err != nil {
return nil, fmt.Errorf("failed to generate sandbox runtime options: %w", err) return nil, fmt.Errorf("failed to generate sandbox runtime options: %w", err)
} }

View File

@ -332,7 +332,7 @@ func parseImageReferences(refs []string) ([]string, []string) {
} }
// generateRuntimeOptions generates runtime options from cri plugin config. // 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 { if r.Options == nil {
return nil, nil return nil, nil
} }

View File

@ -281,7 +281,7 @@ func TestGenerateRuntimeOptions(t *testing.T) {
} { } {
test := test test := test
t.Run(test.desc, func(t *testing.T) { 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.NoError(t, err)
assert.Equal(t, test.expectedOptions, opts) assert.Equal(t, test.expectedOptions, opts)
}) })

View File

@ -152,7 +152,7 @@ func (c *criService) RunPodSandbox(ctx context.Context, r *runtime.RunPodSandbox
sandboxLabels := buildLabels(config.Labels, image.ImageSpec.Config.Labels, containerKindSandbox) sandboxLabels := buildLabels(config.Labels, image.ImageSpec.Config.Labels, containerKindSandbox)
runtimeOpts, err := generateRuntimeOptions(ociRuntime, c.config) runtimeOpts, err := generateRuntimeOptions(ociRuntime)
if err != nil { if err != nil {
return nil, fmt.Errorf("failed to generate runtime options: %w", err) return nil, fmt.Errorf("failed to generate runtime options: %w", err)
} }