CronJob transformation fixed

- no longer add labels in an invalid location (#116)
- only have selector added it already present
This commit is contained in:
Ryan Morehart
2018-06-19 06:14:05 -06:00
parent 398ceb0a92
commit 50c40eb80c
2 changed files with 134 additions and 6 deletions

View File

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