Extract common generator args to common type.

This commit is contained in:
Jeffrey Regan
2018-12-07 11:30:38 -08:00
parent 1ce1b82f6f
commit cbcc976828
4 changed files with 29 additions and 34 deletions

View File

@@ -125,7 +125,7 @@ func makeConfigMapArgs(m *types.Kustomization, name string) *types.ConfigMapArgs
}
}
// config map not found, create new one and add it to the kustomization file.
cm := &types.ConfigMapArgs{Name: name}
cm := &types.ConfigMapArgs{GeneratorArgs: types.GeneratorArgs{Name: name}}
m.ConfigMapGenerator = append(m.ConfigMapGenerator, *cm)
return &m.ConfigMapGenerator[len(m.ConfigMapGenerator)-1]
}