gen

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GenMountCommand = &cobra.Command{
	Use:   "gen",
	Short: "add mount to your " + constants.CMD_NAME + "-config file by selection from the all the [ config | secret ] available selected project",
	Long: `Add mount
This command help you to add generated config so you can get your config or secret downloaded and dumped in a file.

Examples:
  # add config to download at the time of load
  kl gen --configName=<config_name>

  # add secret to download at the time of load
  kl gen --secretName=<secret_name>
`,
	Run: func(cmd *cobra.Command, args []string) {
		klFile, err := server.GetKlFile(nil)
		if err != nil {
			common.PrintError(err)
			es := "please run '" + constants.CMD_NAME + " init' if you are not initialized the file already"
			common.PrintError(fmt.Errorf(es))
			return
		}
		path := ""

		if len(args) > 0 {
			path = args[0]
		}

		err = selectConfigMount(path, *klFile, cmd)
		if err != nil {
			common.PrintError(err)
			return
		}
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL