Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify the description of "namespace" in the UI and CLI #1023

Merged
merged 8 commits into from
Nov 8, 2021
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Available Commands:

Flags:
-h, --help Help for gitops
--namespace string Weave GitOps runtime namespace (default "wego-system")
--namespace string The Kubernetes namespace in which Weave GitOps objects will be stored (default "wego-system").
-v, --verbose Enable verbose output

Use "gitops [command] --help" for more information about a command.
Expand Down
2 changes: 1 addition & 1 deletion cmd/gitops/root/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func RootCmd(client *resty.Client) *cobra.Command {
}

rootCmd.PersistentFlags().BoolVarP(&options.verbose, "verbose", "v", false, "Enable verbose output")
rootCmd.PersistentFlags().String("namespace", wego.DefaultNamespace, "Weave GitOps runtime namespace")
rootCmd.PersistentFlags().String("namespace", wego.DefaultNamespace, "The Kubernetes namespace in which Weave GitOps objects will be stored (default \"wego-system\").")
rootCmd.PersistentFlags().StringVarP(&options.endpoint, "endpoint", "e", os.Getenv("WEAVE_GITOPS_ENTERPRISE_API_URL"), "The Weave GitOps Enterprise HTTP API endpoint")
rootCmd.PersistentFlags().BoolVar(&options.overrideInCluster, "override-in-cluster", false, "override running in cluster check")
cobra.CheckErr(rootCmd.PersistentFlags().MarkHidden("override-in-cluster"))
Expand Down
4 changes: 2 additions & 2 deletions test/acceptance/test/install_tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ var _ = Describe("Weave GitOps Install Tests", func() {

By("Then I should see gitops help text displayed for 'install' command", func() {
Eventually(string(sessionOutput.Wait().Out.Contents())).Should(MatchRegexp(
fmt.Sprintf(`The install command deploys GitOps in the specified namespace.\nIf a previous version is installed, then an in-place upgrade will be performed.\n*Usage:\n\s*gitops install \[flags]\n*Examples:\n\s*# Install GitOps in the %s namespace\n\s*gitops install\n*Flags:\n\s*--dry-run\s*Outputs all the manifests that would be installed\n\s*-h, --help\s*help for install\n*Global Flags:\n\s*-e, --endpoint string\s*The Weave GitOps Enterprise HTTP API endpoint\n\s*--namespace string\s*Weave GitOps runtime namespace \(default "%s"\)\n\s*-v, --verbose\s*Enable verbose output`, wego.DefaultNamespace, wego.DefaultNamespace)))
fmt.Sprintf(`The install command deploys GitOps in the specified namespace.\nIf a previous version is installed, then an in-place upgrade will be performed.\n*Usage:\n\s*gitops install \[flags]\n*Examples:\n\s*# Install GitOps in the %s namespace\n\s*gitops install\n*Flags:\n\s*--dry-run\s*Outputs all the manifests that would be installed\n\s*-h, --help\s*help for install\n*Global Flags:\n\s*-e, --endpoint string\s*The Weave GitOps Enterprise HTTP API endpoint\n\s*--namespace string\s*The Kubernetes namespace in which Weave GitOps objects will be stored \(default "%s"\).\n\s*-v, --verbose\s*Enable verbose output`, wego.DefaultNamespace, wego.DefaultNamespace)))
})
})

Expand All @@ -48,7 +48,7 @@ var _ = Describe("Weave GitOps Install Tests", func() {

By("Then I should see gitops help text displayed for 'uninstall' command", func() {
Eventually(string(sessionOutput.Wait().Out.Contents())).Should(MatchRegexp(
fmt.Sprintf(`The uninstall command removes GitOps components from the cluster.\n*Usage:\n\s*gitops uninstall \[flags]\n*Examples:\n\s*# Uninstall GitOps from the %s namespace\n\s*gitops uninstall\n*Flags:\n\s*--dry-run\s*Outputs all the manifests that would be uninstalled\n\s*-h, --help\s*help for uninstall\n*Global Flags:\n\s*-e, --endpoint string\s*The Weave GitOps Enterprise HTTP API endpoint\n\s*--namespace string\s*Weave GitOps runtime namespace \(default "%s"\)\n\s*-v, --verbose\s*Enable verbose output`, wego.DefaultNamespace, wego.DefaultNamespace)))
fmt.Sprintf(`The uninstall command removes GitOps components from the cluster.\n*Usage:\n\s*gitops uninstall \[flags]\n*Examples:\n\s*# Uninstall GitOps from the %s namespace\n\s*gitops uninstall\n*Flags:\n\s*--dry-run\s*Outputs all the manifests that would be uninstalled\n\s*-h, --help\s*help for uninstall\n*Global Flags:\n\s*-e, --endpoint string\s*The Weave GitOps Enterprise HTTP API endpoint\n\s*--namespace string\s*The Kubernetes namespace in which Weave GitOps objects will be stored \(default "%s"\).\n\s*-v, --verbose\s*Enable verbose output`, wego.DefaultNamespace, wego.DefaultNamespace)))
})
})

Expand Down
2 changes: 1 addition & 1 deletion ui/pages/ApplicationAdd.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ function AddApplication({ className }: Props) {
value={formState.namespace}
/>
<FormHelperText>
The the target namespace for the application
The namespace where GitOps automation objects will be stored.
</FormHelperText>
</FormElement>
<FormElement>
Expand Down