Merge pull request #8708 from marquiz/devel/cri-cleanup
cri: drop unused arg from generateRuntimeOptions
This commit is contained in:
commit
2353574aa9
@ -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
|
||||
}
|
||||
|
@ -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)
|
||||
})
|
||||
|
@ -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)
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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)
|
||||
})
|
||||
|
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user