Skip to content

Add Redpanda Kafka-compatible hosting integration#1410

Open
slang25 wants to merge 6 commits into
CommunityToolkit:mainfrom
slang25:slang25/redpanda-hosting-package
Open

Add Redpanda Kafka-compatible hosting integration#1410
slang25 wants to merge 6 commits into
CommunityToolkit:mainfrom
slang25:slang25/redpanda-hosting-package

Conversation

@slang25

@slang25 slang25 commented Jun 14, 2026

Copy link
Copy Markdown

Closes #<ISSUE_NUMBER>

Adds CommunityToolkit.Aspire.Hosting.RedPanda, an Aspire hosting integration for the Redpanda Kafka-compatible streaming platform. AddRedPanda runs a single-node broker (pinned image redpandadata/redpanda:v26.1.10) exposing Kafka, internal, Schema Registry, and Admin endpoints with an Admin-API health check, and the resource can be referenced by any Kafka client integration. Optional extensions cover WithConsole (Redpanda Console web UI, redpandadata/console:v3.7.4), WithDataVolume/WithDataBindMount for persistence, and WithHostPort. The change also adds unit and Docker-based integration tests, an example AppHost, a package README, and wires the projects into the solution, README catalog, and a repo-wide MessagePack NuGet audit suppression.

PR Checklist

  • Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • Based off latest main branch of toolkit
  • PR doesn't include merge commits (always rebase on top of our main, if needed)
  • New integration
    • Docs are written
    • Added description of major feature to project description for NuGet package (4000 total character limit, so don't push entire description over that)
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Contains NO breaking changes
  • Every new API (including internal ones) has full XML docs
  • Code follows all style conventions

Other information

The Kafka listener setup mirrors the upstream Aspire.Hosting.Kafka pattern: the connection string targets the host-facing kafka endpoint, while a separate internal listener (advertised as {resource}:29092) is used for container-to-container traffic, including the bundled console.

🤖 Generated with Claude Code

Adds CommunityToolkit.Aspire.Hosting.RedPanda, an Aspire hosting package
for the Redpanda Kafka-compatible streaming platform. Includes AddRedPanda
with Kafka, internal, Schema Registry, and Admin endpoints, WithConsole,
WithDataVolume/WithDataBindMount, and WithHostPort extensions, plus unit
and Docker integration tests, an example AppHost, README, and solution and
NuGet audit wiring.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 14, 2026 08:59
@github-actions

github-actions Bot commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.sh | bash -s -- 1410

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.ps1) } 1410"

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds a new Aspire hosting integration for Redpanda (Kafka-compatible streaming platform), including the core hosting resource/builder APIs, docs, examples, and tests.

Changes:

  • Introduces AddRedPanda(...) and related builder extensions (console + data persistence) plus exported resource types.
  • Adds a Redpanda example AppHost project.
  • Adds unit + integration tests and links the new integration from the repo README (plus a NuGet audit suppression note).

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/CommunityToolkit.Aspire.Hosting.RedPanda.Tests/ResourceCreationTests.cs Adds unit tests validating resource creation, endpoints, image annotations, console, and volume mounts.
tests/CommunityToolkit.Aspire.Hosting.RedPanda.Tests/AppHostTests.cs Adds Docker-based integration tests validating Redpanda Admin API and Schema Registry readiness.
tests/CommunityToolkit.Aspire.Hosting.RedPanda.Tests/CommunityToolkit.Aspire.Hosting.RedPanda.Tests.csproj Introduces a new test project referencing the new hosting package + example AppHost.
src/CommunityToolkit.Aspire.Hosting.RedPanda/RedPandaServerResource.cs Adds the primary Redpanda server resource with connection-string expression and exported properties.
src/CommunityToolkit.Aspire.Hosting.RedPanda/RedPandaConsoleContainerResource.cs Adds the Redpanda Console container resource type.
src/CommunityToolkit.Aspire.Hosting.RedPanda/RedPandaContainerImageTags.cs Centralizes pinned image/registry/tag constants for broker and console images.
src/CommunityToolkit.Aspire.Hosting.RedPanda/RedPandaBuilderExtensions.cs Implements AddRedPanda, persistence options, console support, and container configuration (args/env/healthcheck).
src/CommunityToolkit.Aspire.Hosting.RedPanda/README.md Documents usage, endpoints, and pinned upstream images/tags.
src/CommunityToolkit.Aspire.Hosting.RedPanda/CommunityToolkit.Aspire.Hosting.RedPanda.csproj Adds the new hosting package project and exposes internals to the test assembly.
examples/redpanda/CommunityToolkit.Aspire.Hosting.RedPanda.AppHost/Program.cs Adds an example AppHost that provisions Redpanda + Console.
examples/redpanda/CommunityToolkit.Aspire.Hosting.RedPanda.AppHost/appsettings.json Adds logging defaults for the example AppHost.
examples/redpanda/CommunityToolkit.Aspire.Hosting.RedPanda.AppHost/Properties/launchSettings.json Adds launch profiles for the example AppHost.
examples/redpanda/CommunityToolkit.Aspire.Hosting.RedPanda.AppHost/CommunityToolkit.Aspire.Hosting.RedPanda.AppHost.csproj Adds the example AppHost project file referencing the new hosting package.
README.md Adds Redpanda integration entry + NuGet/doc links to the main repository readme table.
Directory.Build.props Adds a repo-wide NuGet audit suppression entry with justification comment.
CommunityToolkit.Aspire.slnx Adds the new Redpanda src/tests projects and the example folder/project to the solution.

Comment thread src/CommunityToolkit.Aspire.Hosting.RedPanda/RedPandaBuilderExtensions.cs Outdated
Addresses PR review feedback: introduces RedPandaServerOptions with
CpuCount and Memory, plus an AddRedPanda overload taking a configuration
delegate so the Redpanda --smp and --memory limits are no longer hard
coded. Adds a unit test for WithDataBindMount and tests covering the
default and configured broker arguments.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@Odonno Odonno left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM.

Just one question: can Kafbat UI also be supported? (see Kafka integration)

slang25 and others added 4 commits June 14, 2026 15:04
Adds an optional WithKafkaUI extension that runs the kafbat/kafka-ui
container (the same UI used by the official Aspire Kafka integration)
wired to the Redpanda broker's Kafka API and Schema Registry, alongside
the existing Redpanda Console. Includes a dedicated resource type, a
WithHostPort overload, README example, and unit tests.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@slang25

slang25 commented Jun 19, 2026

Copy link
Copy Markdown
Author

@aaronpowell 👋 are you able to take a look when you have some time 🙂

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants