Skip to content

Conversation

@r-vasquez
Copy link
Contributor

When editing a profile, all available configuration fields are now displayed. Fields that are not set are shown as comments with documentation describing their purpose. This helps users discover available options without consulting external documentation.

Samples

Before

name: rpk-container
description: Automatically generated profile from 'rpk container start'
prompt: ""
from_cloud: false
kafka_api:
    brokers:
        - 127.0.0.1:9092
    sasl:
        user: foo
admin_api:
    addresses:
        - 127.0.0.1:9644
schema_registry:
    addresses:
        - 127.0.0.1:8081

After

# Available fields are shown below. Uncomment and edit as needed.
# For more information, run: rpk profile set --help

# Unique identifier for this profile
name: rpk-container

# Human-readable description of this profile
description: "Automatically generated profile from 'rpk container start'"

# Custom shell prompt format; overrides globals.prompt if set
# prompt: ""

# Kafka API connection configuration
kafka_api:
  # Comma-separated list of broker addresses (host:port)
  brokers:
    - "127.0.0.1:9092"
  # TLS configuration for Kafka API connections
  # tls:
    # Path to client private key file for mTLS
    # key_file: ""
    # Path to client certificate file for mTLS
    # cert_file: ""
    # Path to CA certificate file for TLS verification
    # ca_file: ""
    # Skip TLS certificate verification (not recommended for production)
    # insecure_skip_verify: false
  # SASL authentication configuration
  sasl:
    # username for authentication
    user: foo
    # password for authentication
    # password: ""
    # SCRAM-SHA-256 or SCRAM-SHA-512
    # mechanism: ""

# Admin API connection configuration
admin_api:
  # Comma-separated list of Admin API addresses (host:port)
  addresses:
    - "127.0.0.1:9644"
  # TLS configuration for Admin API connections
  # tls:
    # Path to client private key file for mTLS
    # key_file: ""
    # Path to client certificate file for mTLS
    # cert_file: ""
    # Path to CA certificate file for TLS verification
    # ca_file: ""
    # Skip TLS certificate verification (not recommended for production)
    # insecure_skip_verify: false

# Schema Registry connection configuration
schema_registry:
  # Comma-separated list of Schema Registry addresses (host:port)
  addresses:
    - "127.0.0.1:8081"
  # TLS configuration for Schema Registry connections
  # tls:
    # Path to client private key file for mTLS
    # key_file: ""
    # Path to client certificate file for mTLS
    # cert_file: ""
    # Path to CA certificate file for TLS verification
    # ca_file: ""
    # Skip TLS certificate verification (not recommended for production)
    # insecure_skip_verify: false

In addition, we now detect whether a profile was modified while being edited, and the message shown after closing the editor indicates whether any changes were made.

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v25.3.x
  • v25.2.x
  • v25.1.x

Release Notes

Features

  • rpk profile edit now documents each available field for an rpk profile

We can save a write and provide a better
experience this way
When editing a profile, all available configuration
fields are now displayed. Fields that are not set
are shown as comments with documentation describing
their purpose. This helps users discover available
options without consulting external documentation.
@r-vasquez r-vasquez requested review from a team and kbatuigas as code owners January 16, 2026 19:20
@r-vasquez r-vasquez requested review from Copilot, twmb and weeco and removed request for a team, Copilot, kbatuigas and weeco January 16, 2026 19:20
@r-vasquez r-vasquez requested review from a team, c-julin, graham-rp, kbatuigas and paulohtb6 and removed request for a team January 16, 2026 19:20
update.Name = name
}

if profilesEqual(original, update) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I think we should return msg string, ok bool and then you can format your message with the message if not ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants