Adds kustomize edit add base command

This pull request adds support for editing the kustomization.yaml in the current directory with a base.
This commit is contained in:
guineveresaenger
2018-06-08 15:51:57 -07:00
parent f557841e54
commit a1dcf3386b
3 changed files with 185 additions and 1 deletions

View File

@@ -81,7 +81,7 @@ func newCmdEdit(fsys fs.FileSystem) *cobra.Command {
func newCmdAdd(fsys fs.FileSystem) *cobra.Command {
c := &cobra.Command{
Use: "add",
Short: "Adds configmap/resource/patch to the kustomization file.",
Short: "Adds configmap/resource/patch/base to the kustomization file.",
Long: "",
Example: `
# Adds a configmap to the kustomization file
@@ -92,6 +92,9 @@ func newCmdAdd(fsys fs.FileSystem) *cobra.Command {
# Adds a patch to the kustomization
kustomize edit add patch <filepath>
# Adds a base directory to the kustomization
kustomize edit add base <filepath>
`,
Args: cobra.MinimumNArgs(1),
}
@@ -99,6 +102,7 @@ func newCmdAdd(fsys fs.FileSystem) *cobra.Command {
newCmdAddResource(fsys),
newCmdAddPatch(fsys),
newCmdAddConfigMap(fsys),
newCmdAddBase(fsys),
)
return c
}