cli

package
v0.0.0-...-d59ed34 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: BSD-2-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "k8s",
	Short: "cli for deploying and running import commands in kubernetes cluster",
	PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
		if err := cli.PreRunLogger(cmd); err != nil {
			return errors.Errorf("error in executing pre run %s", err)
		}
		kcfg, _ := cmd.Flags().GetString("kubeconfig")
		if len(kcfg) == 0 {
			return nil
		}
		client, err := connectTok8s()
		if err != nil {
			return errors.Errorf("error in getting kubernetes client %s", err)
		}
		registry.SetKubeClient(registry.KubeClientKey, client)

		return nil
	},
	RunE: func(cmd *cobra.Command, args []string) error {
		if err := cli.RunDoc(cmd); err != nil {
			return errors.Errorf("error in generating docs %s", err)
		}
		return nil
	},
}

RootCmd represents the base command when called without any subcommands

View Source
var SubCmd = &cobra.Command{
	Use:   "run",
	Short: "subcommand for deploying kubernetes manifest",
}

JobCmd is the base subcommand for grouping all commands that deploy kubernetes job manifest

Functions

func Execute

func Execute()

Execute adds all child commands to the root command sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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