-
Notifications
You must be signed in to change notification settings - Fork 47
rpk: update profile docs #1015
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: update profile docs #1015
Conversation
✅ Deploy Preview for redpanda-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
PR Change SummaryUpdated the profile documentation to reflect changes in configuration management and environment variable usage.
Modified Files
How can I customize these reviews?Check out the Hyperlint AI Reviewer docs for more information on how to customize the review. If you just want to ignore it on this PR, you can add the Note specifically for link checks, we only check the first 30 links in a file and we cache the results for several hours (for instance, if you just added a page, you might experience this). Our recommendation is to add What is Hyperlint?Hyperlint is an AI agent that helps you write, edit, and maintain your documentation. Learn more about the Hyperlint AI reviewer and the checks that we can run on your documentation. |
| You can customize settings for a single profile. To set a profile's configuration: | ||
|
|
||
| * Use xref:reference:rpk/rpk-profile/rpk-profile-set.adoc[`rpk profile set`] to set `key=value` pairs of configuration options to write to the profile's section of `rpk.yaml`. | ||
| * Use xref:reference:rpk/rpk-profile/rpk-profile-edit.adoc[`rpk profile edit`] to edit the profile's section of the `rpk.yaml` file in your default editor. | ||
|
|
||
| You can configure settings that apply to all profiles. To set these `globals`: | ||
|
|
||
| * Use xref:reference:rpk/rpk-profile/rpk-profile-set-globals.adoc[`rpk profile set-globals`] to set `key=value` pairs to write to the globals section | ||
| of `rpk.yaml`. | ||
| * Use xref:reference:rpk/rpk-profile/rpk-profile-edit-globals.adoc[`rpk profile edit-globals`] to edit the globals section of the `rpk.yaml` file in your default editor. | ||
|
|
||
| You can customize settings for a single profile. To set a profile's configuration: | ||
|
|
||
| * Use xref:reference:rpk/rpk-profile/rpk-profile-set.adoc[`rpk profile set`] to set `key=value` pairs of configuration options to write to the profile's section of `rpk.yaml`. | ||
| * Use xref:reference:rpk/rpk-profile/rpk-profile-edit.adoc[`rpk profile edit`] to edit the profile's section of the `rpk.yaml` file in your default editor. | ||
| For a list of all the available properties that can be set in your profile, see xref:reference:rpk/rpk-x-options.adoc[`rpk -X options`] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I swapped the order here as setting configuration values for single profiles are more important than setting globals.
| You can customize settings for a single profile. To set a profile's configuration: | ||
|
|
||
| * Use xref:reference:rpk/rpk-profile/rpk-profile-set.adoc[`rpk profile set`] to set `key=value` pairs of configuration options to write to the profile's section of `rpk.yaml`. | ||
| * Use xref:reference:rpk/rpk-profile/rpk-profile-edit.adoc[`rpk profile edit`] to edit the profile's section of the `rpk.yaml` file in your default editor. | ||
|
|
||
| You can configure settings that apply to all profiles. To set these `globals`: | ||
|
|
||
| * Use xref:reference:rpk/rpk-profile/rpk-profile-set-globals.adoc[`rpk profile set-globals`] to set `key=value` pairs to write to the globals section | ||
| of `rpk.yaml`. | ||
| * Use xref:reference:rpk/rpk-profile/rpk-profile-edit-globals.adoc[`rpk profile edit-globals`] to edit the globals section of the `rpk.yaml` file in your default editor. | ||
|
|
||
| You can customize settings for a single profile. To set a profile's configuration: | ||
|
|
||
| * Use xref:reference:rpk/rpk-profile/rpk-profile-set.adoc[`rpk profile set`] to set `key=value` pairs of configuration options to write to the profile's section of `rpk.yaml`. | ||
| * Use xref:reference:rpk/rpk-profile/rpk-profile-edit.adoc[`rpk profile edit`] to edit the profile's section of the `rpk.yaml` file in your default editor. | ||
| For a list of all the available properties that can be set in your profile, see xref:reference:rpk/rpk-x-options.adoc[`rpk -X options`] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if we should instead have a partial that gets rendered both here and on the -X page.
| endif::[] | ||
| == Specify command properties | ||
| == Specify configuration properties |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A command property only can be specified via flags when you execute a function, for example:
rpk topic consume foo --group g1
Here, --group is a command property and can only be specified via flags.
However, configuration properties can be specified in every command; for example, if I want to set which broker rpk talks to, I could do:
# set it in the profile
rpk profile set brokers=foo.com
rpk topic consume foo
# Pass it with a -X flag:
rpk topic consume foo -X brokers=foo.com
# Pass it via env flags:
RPK_BROKERS=foo.com rpk topic consume
| * Define the corresponding environment variables. | ||
| + | ||
| Environment variable settings only last for the duration of a shell session. | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing references to the rpk section as we want to move everything we can to profiles and the rpk section of the redpanda.yaml is deprecated.
It will always be maintained, but any new feature will be added to profiles and not there.
w.r.t modifying the rpk.yaml, we prefer the user to use rpk profile commands to do so and not manually edit the rpk.yaml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@r-vasquez Should this line in the next paragraph also be changed then to remove the part about redpanda.yaml?
If the environment variable is not set, the value in the rpk.yaml configuration file is used, if that file is available, otherwise the value in the redpanda.yaml configuration file is used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@r-vasquez should we also remove the rpk bullet from this page?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's fine to leave both as:
If the environment variable is not set, the value in the rpk.yaml configuration file is used, if that file is available, otherwise the value in the redpanda.yaml configuration file is used.
It's useful information on how rpk parses the properties but doesn't encourage users to use the redpanda.yaml
And from the link, it's fine to keep it.
| ---- | ||
|
|
||
| Some of the common configuration properties apply across all `rpk` commands as defaults. These default properties have keys with names starting with `defaults`, and they're viewable in `rpk -X list` and `rpk -X help`. For more details, see xref:reference:rpk/rpk-x-options.adoc[`rpk -X options`]. | ||
| Every `-X` option can be translated into an environment variable by prefixing with `RPK_` and replacing periods (`.`) with underscores (`_`). For example, the flag `tls.enabled` has the equivalent environment variable `RPK_TLS_ENABLED`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This paragraph is a copy from https://docs.redpanda.com/current/reference/rpk/rpk-x-options/
There are multiple changes here: 1. Update `default` -> `global` 2. Not documenting the manipulation of the redpanda.yaml (deprecated) or rpk.yaml (we use rpk profile for this instead) 3. Adding information about how to turn a flag into an env variable.
961f38a to
f2c027f
Compare
Co-authored-by: Michele Cyran <[email protected]>
micheleRP
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thank you!
Co-authored-by: Michele Cyran <[email protected]>
Description
There are multiple changes here:
default->globalPage previews
Checks