Interpret projected configMap volume names

Append hashes to configMap names under the projected configMap volume,
for Kind: Deployment and StatefulSet
This commit is contained in:
George Angel
2018-07-11 10:28:57 +01:00
parent 3305be9589
commit aa729229e2
3 changed files with 105 additions and 0 deletions

View File

@@ -146,6 +146,13 @@ var defaultNameReferencePathConfigs = []ReferencePathConfig{
Path: []string{"spec", "template", "spec", "initContainers", "envFrom", "configMapRef", "name"},
CreateIfNotPresent: false,
},
{
GroupVersionKind: &schema.GroupVersionKind{
Kind: "Deployment",
},
Path: []string{"spec", "template", "spec", "volumes", "projected", "sources", "configMap", "name"},
CreateIfNotPresent: false,
},
{
GroupVersionKind: &schema.GroupVersionKind{
Kind: "ReplicaSet",
@@ -251,6 +258,13 @@ var defaultNameReferencePathConfigs = []ReferencePathConfig{
Path: []string{"spec", "template", "spec", "initContainers", "envFrom", "configMapRef", "name"},
CreateIfNotPresent: false,
},
{
GroupVersionKind: &schema.GroupVersionKind{
Kind: "StatefulSet",
},
Path: []string{"spec", "template", "spec", "volumes", "projected", "sources", "configMap", "name"},
CreateIfNotPresent: false,
},
{
GroupVersionKind: &schema.GroupVersionKind{
Kind: "Job",