Skip to content

Commit

Permalink
added missing environmentID flag
Browse files Browse the repository at this point in the history
Signed-off-by: Kartikay <[email protected]>
  • Loading branch information
kartikaysaxena committed Feb 15, 2024
1 parent 5a7722d commit 9bf0d4e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pkg/cmd/connect/connect.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ var ConnectCmd = &cobra.Command{
Short: `Connect resources for LitmusChaos Execution plane.
Examples:
#connect a Chaos Infrastructure
litmusctl connect chaos-infra --name="new-chaos-infra" --non-interactive
litmusctl connect chaos-infra --name="new-chaos-infra" --non-interactive --environment-id="my-environment-id"
#connect a chaos-infrastructure within a project
litmusctl connect chaos-infra --name="new-chaos-infra" --project-id="d861b650-1549-4574-b2ba-ab754058dd04" --non-interactive
litmusctl connect chaos-infra --name="new-chaos-infra" --environment-id="my-environment-id" --project-id="d861b650-1549-4574-b2ba-ab754058dd04" --non-interactive
Note: The default location of the config file is $HOME/.litmusconfig, and can be overridden by a --config flag
`,
}
4 changes: 2 additions & 2 deletions pkg/cmd/connect/infra.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ var infraCmd = &cobra.Command{
os.Exit(1)
}

newInfra.EnvironmentID, err = cmd.Flags().GetString("environmentID")
newInfra.EnvironmentID, _ = cmd.Flags().GetString("environment-id")
if newInfra.EnvironmentID == "" {
utils.Red.Print("Error: --environment flag is empty")
os.Exit(1)
Expand Down Expand Up @@ -270,7 +270,7 @@ func init() {
infraCmd.Flags().BoolP("non-interactive", "n", false, "Set it to true for non interactive mode | Note: Always set the boolean flag as --non-interactive=Boolean")
infraCmd.Flags().StringP("kubeconfig", "k", "", "Set to pass kubeconfig file if it is not in the default location ($HOME/.kube/config)")
infraCmd.Flags().String("tolerations", "", "Set the tolerations for Chaos infra components | Format: '[{\"key\":\"key1\",\"value\":\"value1\",\"operator\":\"Exist\",\"effect\":\"NoSchedule\",\"tolerationSeconds\":30}]'")

infraCmd.Flags().String("environment-id", "", "Set the environmentID for the Chaos infra installation")
infraCmd.Flags().String("project-id", "", "Set the project-id to install Chaos infra for the particular project. To see the projects, apply litmusctl get projects")
infraCmd.Flags().String("installation-mode", "cluster", "Set the installation mode for the kind of Chaos infra | Supported=cluster/namespace")
infraCmd.Flags().String("name", "", "Set the Chaos infra name")
Expand Down

0 comments on commit 9bf0d4e

Please sign in to comment.