fix wrong paths of name reference transformer config

This commit is contained in:
ymqytw 2018-02-06 17:01:47 -08:00
parent 087c096eff
commit 021e6bd569
4 changed files with 10 additions and 10 deletions

View File

@ -135,4 +135,4 @@ spec:
name: app-env
- name: app-tls
secret:
name: test-infra-app-tls-4d47hbbh9m
secretName: test-infra-app-tls-4d47hbbh9m

View File

@ -39,5 +39,5 @@ spec:
name: app-env
name: app-env
- secret:
name: app-tls
secretName: app-tls
name: app-tls

View File

@ -106,7 +106,7 @@ func makeNameRefDeployment(cmName, secretName string) *unstructured.Unstructured
"name": cmName,
},
"secret": map[string]interface{}{
"name": secretName,
"secretName": secretName,
},
},
},

View File

@ -192,7 +192,7 @@ var defaultNameReferencePathConfigs = []referencePathConfig{
Version: "v1",
Kind: "Pod",
},
Path: []string{"spec", "volumes", "secret", "name"},
Path: []string{"spec", "volumes", "secret", "secretName"},
CreateIfNotPresent: false,
},
{
@ -215,7 +215,7 @@ var defaultNameReferencePathConfigs = []referencePathConfig{
GroupVersionKind: &schema.GroupVersionKind{
Kind: "Deployment",
},
Path: []string{"spec", "template", "spec", "volumes", "secret", "name"},
Path: []string{"spec", "template", "spec", "volumes", "secret", "secretName"},
CreateIfNotPresent: false,
},
{
@ -236,7 +236,7 @@ var defaultNameReferencePathConfigs = []referencePathConfig{
GroupVersionKind: &schema.GroupVersionKind{
Kind: "ReplicaSet",
},
Path: []string{"spec", "template", "spec", "volumes", "secret", "name"},
Path: []string{"spec", "template", "spec", "volumes", "secret", "secretName"},
CreateIfNotPresent: false,
},
{
@ -257,7 +257,7 @@ var defaultNameReferencePathConfigs = []referencePathConfig{
GroupVersionKind: &schema.GroupVersionKind{
Kind: "DaemonSet",
},
Path: []string{"spec", "template", "spec", "volumes", "secret", "name"},
Path: []string{"spec", "template", "spec", "volumes", "secret", "secretName"},
CreateIfNotPresent: false,
},
{
@ -278,7 +278,7 @@ var defaultNameReferencePathConfigs = []referencePathConfig{
GroupVersionKind: &schema.GroupVersionKind{
Kind: "StatefulSet",
},
Path: []string{"spec", "template", "spec", "volumes", "secret", "name"},
Path: []string{"spec", "template", "spec", "volumes", "secret", "secretName"},
CreateIfNotPresent: false,
},
{
@ -299,7 +299,7 @@ var defaultNameReferencePathConfigs = []referencePathConfig{
GroupVersionKind: &schema.GroupVersionKind{
Kind: "Job",
},
Path: []string{"spec", "template", "spec", "volumes", "secret", "name"},
Path: []string{"spec", "template", "spec", "volumes", "secret", "secretName"},
CreateIfNotPresent: false,
},
{
@ -320,7 +320,7 @@ var defaultNameReferencePathConfigs = []referencePathConfig{
GroupVersionKind: &schema.GroupVersionKind{
Kind: "CronJob",
},
Path: []string{"spec", "jobTemplate", "spec", "template", "spec", "volumes", "secret", "name"},
Path: []string{"spec", "jobTemplate", "spec", "template", "spec", "volumes", "secret", "secretName"},
CreateIfNotPresent: false,
},
{