Merge pull request #8708 from marquiz/devel/cri-cleanup

cri: drop unused arg from generateRuntimeOptions
This commit is contained in:
Phil Estes 2023-06-22 15:12:48 -04:00 committed by GitHub
commit 2353574aa9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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.
func generateRuntimeOptions(r criconfig.Runtime, c criconfig.Config) (interface{}, error) {
func generateRuntimeOptions(r criconfig.Runtime) (interface{}, error) {
if r.Options == nil {
return nil, nil
}

View File

@ -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)
})

View File

@ -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)
}

View File

@ -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
}

View File

@ -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)
})

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)
runtimeOpts, err := generateRuntimeOptions(ociRuntime, c.config)
runtimeOpts, err := generateRuntimeOptions(ociRuntime)
if err != nil {
return nil, fmt.Errorf("failed to generate runtime options: %w", err)
}