Skip to content

Commit

Permalink
Fix expanding ENV vars
Browse files Browse the repository at this point in the history
  • Loading branch information
coufalja committed May 10, 2018
1 parent c5d6bbd commit d662934
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
22 changes: 13 additions & 9 deletions cmd/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,34 @@ var lp = struct {
}{}

var loadCmd = &cobra.Command{
Use: "load",
Short: "Loads files from git repository into target",
PersistentPreRunE: cmd.ExpandArgs,
Use: "load",
Short: "Loads files from git repository into target",
DisableFlagParsing: true,
PersistentPreRunE: cmd.ExpandArgs,
}

var loadConfigmapCmd = &cobra.Command{
Use: "configmap",
Short: "Loads files from git repository into ConfigMap",
Use: "configmap",
Short: "Loads files from git repository into ConfigMap",
DisableFlagParsing: true,
RunE: func(c *cobra.Command, args []string) error {
return executeLoad(cmd.ConfigMap)
},
}

var loadSecretCmd = &cobra.Command{
Use: "secret",
Short: "Loads files from git repository into Secret",
Use: "secret",
Short: "Loads files from git repository into Secret",
DisableFlagParsing: true,
RunE: func(c *cobra.Command, args []string) error {
return executeLoad(cmd.Secret)
},
}

var loadFolderCmd = &cobra.Command{
Use: "folder",
Short: "Loads files from git repository into Folder",
Use: "folder",
Short: "Loads files from git repository into Folder",
DisableFlagParsing: true,
RunE: func(c *cobra.Command, args []string) error {
return executeLoad(cmd.Folder)
},
Expand Down
3 changes: 3 additions & 0 deletions cmd/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ var watchCmd = &cobra.Command{
var watchConfigmapCmd = &cobra.Command{
Use: "configmap",
Short: "Runs watcher that periodically check the provided repository and updates K8s ConfigMap accordingly",
DisableFlagParsing: true,
RunE: func(c *cobra.Command, args []string) error {
return executeWatch(cmd.ConfigMap)
},
Expand All @@ -45,6 +46,7 @@ var watchConfigmapCmd = &cobra.Command{
var watchSecretCmd = &cobra.Command{
Use: "secret",
Short: "Runs watcher that periodically check the provided repository and updates K8s Secret accordingly",
DisableFlagParsing: true,
RunE: func(c *cobra.Command, args []string) error {
return executeWatch(cmd.Secret)
},
Expand All @@ -53,6 +55,7 @@ var watchSecretCmd = &cobra.Command{
var watchFolderCmd = &cobra.Command{
Use: "folder",
Short: "Runs watcher that periodically check the provided repository and updates target folder accordingly",
DisableFlagParsing: true,
RunE: func(c *cobra.Command, args []string) error {
return executeWatch(cmd.Folder)
},
Expand Down

0 comments on commit d662934

Please sign in to comment.