Use RawExtension and Object for external and internal scheduling plugin args, respectively

Signed-off-by: Aldo Culquicondor <acondor@google.com>
This commit is contained in:
Aldo Culquicondor
2020-04-08 13:47:52 -04:00
parent ec00b4fcc2
commit ce05382b58
45 changed files with 148 additions and 111 deletions

View File

@@ -204,6 +204,8 @@ profiles:
- name: baz
pluginConfig:
- name: foo
args:
bar: baz
`, configKubeconfig)), os.FileMode(0600)); err != nil {
t.Fatal(err)
}
@@ -543,7 +545,10 @@ profiles:
PluginConfig: []kubeschedulerconfig.PluginConfig{
{
Name: "foo",
Args: runtime.Unknown{},
Args: &runtime.Unknown{
Raw: []byte(`{"bar":"baz"}`),
ContentType: "application/json",
},
},
},
},
@@ -608,7 +613,6 @@ profiles:
PluginConfig: []kubeschedulerconfig.PluginConfig{
{
Name: "foo",
Args: runtime.Unknown{},
},
},
},
@@ -666,7 +670,7 @@ profiles:
PluginConfig: []kubeschedulerconfig.PluginConfig{
{
Name: "InterPodAffinity",
Args: runtime.Unknown{
Args: &runtime.Unknown{
Raw: []byte(`{"hardPodAffinityWeight":5}`),
},
},
@@ -760,7 +764,7 @@ profiles:
}
if diff := cmp.Diff(tc.expectedConfig, config.ComponentConfig); diff != "" {
t.Errorf("incorrect config (-want, +got):\n%s", diff)
t.Errorf("incorrect config (-want,+got):\n%s", diff)
}
// ensure we have a client