Topic Documentation

You can embed your topic’s documentation into the Redpanda Console user interface by providing access to a public or private Git repository that hosts your documentation files in Markdown format.

Topic Documentation

Redpanda Console clones the provided Git repository and stores all Markdown files it finds in memory. The Documentation tab in the frontend displays the content of the Markdown file that matches the name of the Kafka topic.

Path/Filename Topic Name Matches

ordersv2.md

orders-v2

Orders-v2.md

orders-v2

orders-v2.md

orders-v2

/orders/orders-v2.md

orders-v2

Configuration

In addition to the repository URL and branch, you can configure authentication credentials for private repositories. Redpanda Console supports SSH as well as basic auth. If neither is specified you could still pull publicly accessible repositories.

Repository information

Start by specifying the Git repository that contains your Markdown documentation. You need to provide the repository’s URL, the branch you want to use, and the base directory where your documentation is located.

console:
  topicDocumentation:
    git:
      enabled: true
      repository:
        url: https://github.com/<organization>/<repository>
        branch: main
        baseDirectory: <path-to-documentation-files>
  • url: The complete URL of your Git repository.

  • branch: The branch of the repository that has the documentation files.

  • baseDirectory: The path within your repository from where the documentation search should begin. Redpanda Console recursively iterates through five levels of directories.

Refresh interval

Define how often Redpanda Console should refresh the documentation from the repository. This ensures your documentation is always up to date.

console:
  topicDocumentation:
    git:
      enabled: true
      refreshInterval: 10m
  • refreshInterval: A value such as 10m means the documentation will be refreshed every 10 minutes. Adjust this based on how frequently your documentation is updated, or set to 0 to disable automatic refresh.

Authentication configuration

To use private repositories, you must configure authentication. Redpanda Console supports both SSH and basic authentication.

Basic authentication

To use a personal access token:

console:
  topicDocumentation:
    git:
      enabled: true
      basicAuth:
        enabled: true
        username: token # Use "token" for GitHub personal access tokens
        password: "your_github_token"
  • Enable basicAuth and input your GitHub personal access token as the password. If using a personal access token, the username should be token.

SSH authentication

To use SSH-based access:

console:
  topicDocumentation:
    git:
      enabled: true
      ssh:
        enabled: true
        username: git
        privateKey: "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----"
        # OR specify a file path
        privateKeyFilepath: "/path/to/private/key"
        passphrase: "optional_passphrase"
  • Enable SSH and provide your private key either directly in the configuration or in the privateKeyFilepath field. Include the passphrase if your key has one.

Example configuration

Below is an example for a setup where documentation needs frequent updates and is stored in a private repository accessed through SSH:

console:
  topicDocumentation:
    enabled: true
    git:
      enabled: true
      repository:
        url: https://github.com/example/redpanda-docs
        branch: main
        baseDirectory: path/to/documentation
      refreshInterval: 10m
      ssh:
        enabled: true
        username: git
        privateKeyFilepath: "/home/user/.ssh/redpanda_docs_key"
        passphrase: "your_passphrase"

This configuration is designed for a secure and automated integration of topic documentation into the Redpanda Console, using SSH for secure repository access and a refresh interval that keeps the documentation consistently updated without manual intervention.