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

Fix usage of --dangerous-allow-use-of-shared-namespace in hint #1388

Conversation

mamachanko
Copy link
Contributor

@mamachanko mamachanko commented Oct 31, 2023

What this PR does / why we need it:

The example usage of --dangerous-allow-use-of-shared-namespace in the hint is wrong:

❯ kctrl package install --namespace default --package stuff --version 1.19.3 --package-install stuff
kctrl: Error: Creating sensitive resources in a shared namespace (default)(hint: Specify a namespace using the '-n' flag or use kubeconfig to change default namespace 'kubectl config set-context --current --namespace=private-namespace'.Or use '--dangerous-allow-use-of-shared-namespace=default' to allow use of shared namespace)

The issue in detail

use '--dangerous-allow-use-of-shared-namespace=default' to allow use of shared namespace
                                              ↑ this is wrong                         

Instead, simply show to toggle the dangerous flag:

❯ kctrl package install --namespace default --package gateway.ossistio.tanzu.vmware.com --version 1.19.3 --package-install gateway-ossistio
kctrl: Error: Creating sensitive resources in a shared namespace (default)(hint: Specify a namespace using the '-n' flag or use kubeconfig to change default namespace 'kubectl config set-context --current --namespace=private-namespace'.Or use '--dangerous-allow-use-of-shared-namespace' to allow use of shared namespace)

The new hint in detail

use '--dangerous-allow-use-of-shared-namespace' to allow use of shared namespace
                                             ↑ this is better

Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?


Additional Notes for your reviewer:

Review Checklist:
  • Follows the developer guidelines
  • Relevant tests are added or updated
  • Relevant docs in this repo added or updated
  • Relevant carvel.dev docs added or updated in a separate PR and there's
    a link to that PR
  • Code is at least as readable and maintainable as it was before this
    change

Additional documentation e.g., Proposal, usage docs, etc.:


Signed-off-by: Max Brauer <mbrauer@vmware.com>
@100mik
Copy link
Contributor

100mik commented Oct 31, 2023

Nice catch! Looks good to me 🚀

@100mik 100mik merged commit 606e658 into carvel-dev:develop Oct 31, 2023
7 checks passed
@mamachanko mamachanko deleted the topic/mamachanko/develop/fix-dangerous-hint branch October 31, 2023 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants