Merge pull request #121 from traherom/master

Jobs do not create a selector if not already present
This commit is contained in:
Jingfang Liu
2018-06-19 14:22:15 -07:00
committed by GitHub
2 changed files with 248 additions and 7 deletions

View File

@@ -85,7 +85,7 @@ var defaultLabelsPathConfigs = []PathConfig{
{
GroupVersionKind: &schema.GroupVersionKind{Group: "batch", Kind: "Job"},
Path: []string{"spec", "selector", "matchLabels"},
CreateIfNotPresent: true,
CreateIfNotPresent: false,
},
{
GroupVersionKind: &schema.GroupVersionKind{Group: "batch", Kind: "Job"},
@@ -95,12 +95,7 @@ var defaultLabelsPathConfigs = []PathConfig{
{
GroupVersionKind: &schema.GroupVersionKind{Group: "batch", Kind: "CronJob"},
Path: []string{"spec", "jobTemplate", "spec", "selector", "matchLabels"},
CreateIfNotPresent: true,
},
{
GroupVersionKind: &schema.GroupVersionKind{Group: "batch", Kind: "CronJob"},
Path: []string{"spec", "jobTemplate", "spec", "metadata", "labels"},
CreateIfNotPresent: true,
CreateIfNotPresent: false,
},
{
GroupVersionKind: &schema.GroupVersionKind{Group: "batch", Kind: "CronJob"},