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

rpk commands with -v should return some profile info #16916

Open
supahcraig opened this issue Mar 6, 2024 · 0 comments
Open

rpk commands with -v should return some profile info #16916

supahcraig opened this issue Mar 6, 2024 · 0 comments
Labels
area/rpk kind/enhance New feature or request

Comments

@supahcraig
Copy link

supahcraig commented Mar 6, 2024

Who is this for and what problem do they have today?

I created a new self-hosted cluster but when I ran rpk commands it said it was unable to reach an address which was clearly a BYOC seed broker address. rpk profile print confirmed I was using the profile I thought I was using, but it turns out I had forgotten about some environment variables from a prior BYOC cluster I had created. The probem is that there is no way to know how rpk is sourcing things like broker lists, sasl users, etc. If you didn't remember you had set an environment variable you would literally never resolve this.

It would be helpful for the -v option on rpk commands to return the source of the information used to execute the command.

What are the success criteria?

I don't intend to be prescriptive about what the output needs to look like, but something like this is what I have in my head.

cnelson 23:56:50 ~/sandbox/deployment-automation % rpk cluster info -v
08:47:04.632  DEBUG  using broker address found in environment variable REDPANDA_BROKERS
08:47:04.632  DEBUG  using SASL config found in environment variable REDPANDA_SASL_USERNAME
.
.
.

or if a profile was in use

cnelson 23:56:50 ~/sandbox/deployment-automation % rpk cluster info -v
08:47:04.632  DEBUG  using broker address found in rpk profile <profile name>
08:47:04.632  DEBUG  using SASL config found in rpk profile <profile name>
.
.
.

Or if you had a local redpanda.yaml:

cnelson 23:56:50 ~/sandbox/deployment-automation % rpk cluster info -v
08:47:04.632  DEBUG  using broker address found in <path to local redpanda.yaml>
08:47:04.632  DEBUG  using SASL config found in <path to local redpanda.yaml>
.
.
.

Why is solving this problem impactful?

In the cloud UI we invite users to create environment variables to help them connect to their cluster, but rpk profiles is ultimately a better option and if they have multiple clusters it's essentially required. It is very easy to forget that you've got env vars set, and can easily point to the wrong endpoints or just plain not work as in my case. Adding this sort of output to the verbose option will make troubleshooting this sort of thing much easier.

JIRA Link: CORE-1856

@supahcraig supahcraig added the kind/enhance New feature or request label Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/rpk kind/enhance New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant