github.com/iter8-tools/iter8@v1.1.2/cmd/krun.go (about) 1 package cmd 2 3 import ( 4 "io" 5 6 ia "github.com/iter8-tools/iter8/action" 7 "github.com/iter8-tools/iter8/driver" 8 "github.com/spf13/cobra" 9 ) 10 11 // krunDesc is the description of the k run command 12 const krunDesc = ` 13 Run a performance test on Kubernetes. This command reads a test specified in a secret and writes the result back to the secret. 14 15 $ iter8 k run --namespace {{ namespace }} --test {{ test name }} 16 17 This command is intended for use within the Iter8 Docker image that is used to execute Kubernetes tests. 18 ` 19 20 // newKRunCmd creates the Kubernetes run command 21 func newKRunCmd(kd *driver.KubeDriver, _ io.Writer) *cobra.Command { 22 actor := ia.NewRunOpts(kd) 23 actor.EnvSettings = settings 24 cmd := &cobra.Command{ 25 Use: "run", 26 Short: "Run a performance test on Kubernetes", 27 Long: krunDesc, 28 SilenceUsage: true, 29 Hidden: true, 30 RunE: func(_ *cobra.Command, _ []string) error { 31 return actor.KubeRun() 32 }, 33 } 34 addTestFlag(cmd, &actor.Test) 35 return cmd 36 }