add add secret command

This commit is contained in:
Seth Pollack
2019-01-20 00:28:03 -05:00
parent 2c1be17fe7
commit a0c22b8216
7 changed files with 327 additions and 44 deletions

View File

@@ -26,9 +26,12 @@ import (
func NewCmdAdd(fsys fs.FileSystem, v ifc.Validator, kf ifc.KunstructuredFactory) *cobra.Command {
c := &cobra.Command{
Use: "add",
Short: "Adds configmap/resource/patch/base to the kustomization file.",
Short: "Adds an item to the kustomization file.",
Long: "",
Example: `
# Adds a secret to the kustomization file
kustomize edit add secret NAME --from-literal=k=v
# Adds a configmap to the kustomization file
kustomize edit add configmap NAME --from-literal=k=v
@@ -53,6 +56,7 @@ func NewCmdAdd(fsys fs.FileSystem, v ifc.Validator, kf ifc.KunstructuredFactory)
c.AddCommand(
newCmdAddResource(fsys),
newCmdAddPatch(fsys),
newCmdAddSecret(fsys, kf),
newCmdAddConfigMap(fsys, kf),
newCmdAddBase(fsys),
newCmdAddLabel(fsys, v.MakeLabelValidator()),