Rename DataSources to KvPairSources and remove deprecated env field.

This commit is contained in:
Jeffrey Regan
2019-10-15 13:37:06 -07:00
parent 0c52bd71ba
commit bb77e7491a
11 changed files with 45 additions and 67 deletions

View File

@@ -153,21 +153,6 @@ func (k *Kustomization) FixKustomizationPostUnmarshalling() {
if k.Kind == "" {
k.Kind = KustomizationKind
}
// The EnvSource field is deprecated in favor of the list.
for i, g := range k.ConfigMapGenerator {
if g.EnvSource != "" {
k.ConfigMapGenerator[i].EnvSources =
append(g.EnvSources, g.EnvSource)
k.ConfigMapGenerator[i].EnvSource = ""
}
}
for i, g := range k.SecretGenerator {
if g.EnvSource != "" {
k.SecretGenerator[i].EnvSources =
append(g.EnvSources, g.EnvSource)
k.SecretGenerator[i].EnvSource = ""
}
}
for _, b := range k.Bases {
k.Resources = append(k.Resources, b)
}