Skip to content

Commit 2c252f8

Browse files
fix: added missing environmentID flag (#198)
* added missing environmentID flag Signed-off-by: Kartikay <[email protected]> * removed example in a case Signed-off-by: Kartikay <[email protected]> --------- Signed-off-by: Kartikay <[email protected]>
1 parent 8a139b0 commit 2c252f8

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

pkg/cmd/connect/connect.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ var ConnectCmd = &cobra.Command{
2828
litmusctl connect chaos-infra --name="new-chaos-infra" --non-interactive
2929
3030
#connect a chaos-infrastructure within a project
31-
litmusctl connect chaos-infra --name="new-chaos-infra" --project-id="d861b650-1549-4574-b2ba-ab754058dd04" --non-interactive
31+
litmusctl connect chaos-infra --name="new-chaos-infra" --environment-id="my-environment-id" --project-id="d861b650-1549-4574-b2ba-ab754058dd04" --non-interactive
3232
Note: The default location of the config file is $HOME/.litmusconfig, and can be overridden by a --config flag
3333
`,
3434
}

pkg/cmd/connect/infra.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ var infraCmd = &cobra.Command{
105105
os.Exit(1)
106106
}
107107

108-
newInfra.EnvironmentID, _ = cmd.Flags().GetString("environmentID")
108+
newInfra.EnvironmentID, _ = cmd.Flags().GetString("environment-id")
109+
109110
if newInfra.EnvironmentID == "" {
110111
utils.Red.Print("Error: --environment flag is empty")
111112
os.Exit(1)
@@ -271,7 +272,7 @@ func init() {
271272
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")
272273
infraCmd.Flags().StringP("kubeconfig", "k", "", "Set to pass kubeconfig file if it is not in the default location ($HOME/.kube/config)")
273274
infraCmd.Flags().String("tolerations", "", "Set the tolerations for Chaos infra components | Format: '[{\"key\":\"key1\",\"value\":\"value1\",\"operator\":\"Exist\",\"effect\":\"NoSchedule\",\"tolerationSeconds\":30}]'")
274-
275+
infraCmd.Flags().String("environment-id", "", "Set the environmentID for the Chaos infra installation")
275276
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")
276277
infraCmd.Flags().String("installation-mode", "cluster", "Set the installation mode for the kind of Chaos infra | Supported=cluster/namespace")
277278
infraCmd.Flags().String("name", "", "Set the Chaos infra name")

0 commit comments

Comments
 (0)