Skip to content

[docs] Add custom Kubernetes manifest API documentation#927

Open
aspire-repo-bot[bot] wants to merge 1 commit into
release/13.4from
docs/kubernetes-manifest-api-b8b88e11435010cb
Open

[docs] Add custom Kubernetes manifest API documentation#927
aspire-repo-bot[bot] wants to merge 1 commit into
release/13.4from
docs/kubernetes-manifest-api-b8b88e11435010cb

Conversation

@aspire-repo-bot
Copy link
Copy Markdown
Contributor

Documents changes from microsoft/aspire#16883 by @sebastienros.

What changed

Aspire 13.4 adds AddManifest on KubernetesResource, allowing polyglot AppHost authors (TypeScript, Python, Java, Go) to attach arbitrary Kubernetes manifests — such as KEDA ScaledObject definitions — to the generated Helm chart. The C# side continues to use AdditionalResources directly.

Targeting release/13.4 based on the source PR milestone 13.4.

Why this PR is needed

The Kubernetes integration docs page (integrations/compute/kubernetes.mdx) had no coverage for this new API surface. Users would have no discoverability for AddManifest / addManifest / add_manifest or the manifest handle configuration methods.

Summary of changes

Added a new Add custom Kubernetes manifests section to the Kubernetes integration docs with:

  • Multi-language code examples for TypeScript, Python, Java, Go, and C#
  • Reference table of manifest handle configuration methods (WithNamespace, WithLabel, WithAnnotation, WithField)
  • Guidance on when to use AddManifest vs. AdditionalResources in C#

Files modified

  • src/frontend/src/content/docs/integrations/compute/kubernetes.mdx (updated)

Generated by PR Documentation Check for issue #16883 · ● 14.8M ·

Documents the new AddManifest API added in microsoft/aspire#16883,
including polyglot examples (TypeScript, Python, Java, Go) and a
configuration reference table.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@aspire-repo-bot aspire-repo-bot Bot added the docs-from-code Copilot initiated issue from dotnet/aspire repo label May 12, 2026
@aspire-repo-bot aspire-repo-bot Bot requested a review from mitchdenny May 12, 2026 18:08
@IEvangelist IEvangelist marked this pull request as ready for review May 14, 2026 11:46
@IEvangelist IEvangelist self-requested a review as a code owner May 14, 2026 11:46
Copilot AI review requested due to automatic review settings May 14, 2026 11:46
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds documentation for custom Kubernetes manifest support in the Kubernetes integration page, covering polyglot AppHost usage and C# guidance.

Changes:

  • Added an “Add custom Kubernetes manifests” section.
  • Added multi-language examples for attaching KEDA-style manifests.
  • Added a manifest configuration method reference table and C# note.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


`AddManifest` takes the manifest's `apiVersion`, `kind`, and `metadata.name`, and returns a handle that you can use to set labels, annotations, a namespace, and arbitrary field values using dot-notation paths.

<Tabs syncKey='aspire-lang'>
builder.AddContainer("service", "nginx")
.PublishAsKubernetesService(resource =>
{
var scaler = new ScaledObject
Comment on lines +259 to +262
| `WithNamespace(string)` / `with_namespace` | Sets the Kubernetes namespace for the manifest. |
| `WithLabel(key, value)` / `with_label` | Adds a metadata label to the manifest. |
| `WithAnnotation(key, value)` / `with_annotation` | Adds a metadata annotation to the manifest. |
| `WithField(path, value)` / `with_field` | Sets an arbitrary field using dot-notation path (for example, `spec.maxReplicaCount`). |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-from-code Copilot initiated issue from dotnet/aspire repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant