Move Ingress and Gateway extensions to Aspire.Hosting namespace - #16588
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 16588Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 16588" |
There was a problem hiding this comment.
Pull request overview
This PR moves the Kubernetes Ingress/Gateway hosting extension types into the Aspire.Hosting namespace to match the established convention for hosting extension methods (so users don’t need an extra using Aspire.Hosting.Kubernetes; just to access AddIngress/AddGateway and related fluent APIs).
Changes:
- Moved
KubernetesIngressExtensionsfromAspire.Hosting.KubernetestoAspire.Hosting. - Moved
KubernetesGatewayExtensionsfromAspire.Hosting.KubernetestoAspire.Hosting. - Added
using Aspire.Hosting.Kubernetes;to both files so the moved extensions can still reference Kubernetes resource types.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/Aspire.Hosting.Kubernetes/KubernetesIngressExtensions.cs | Moves ingress extension methods into Aspire.Hosting namespace for consistent discoverability. |
| src/Aspire.Hosting.Kubernetes/KubernetesGatewayExtensions.cs | Moves gateway extension methods into Aspire.Hosting namespace for consistent discoverability. |
| using Aspire.Hosting.ApplicationModel; | ||
| using Aspire.Hosting.Kubernetes; | ||
|
|
||
| namespace Aspire.Hosting.Kubernetes; | ||
| namespace Aspire.Hosting; |
There was a problem hiding this comment.
This namespace move changes the public API surface. The generated API baseline file (src/Aspire.Hosting.Kubernetes/api/Aspire.Hosting.Kubernetes.cs) should be regenerated/updated so it reflects KubernetesIngressExtensions under the new Aspire.Hosting namespace (and doesn’t continue to omit these APIs), otherwise API review artifacts and baseline checks will be inaccurate.
| using Aspire.Hosting.ApplicationModel; | ||
| using Aspire.Hosting.Kubernetes; | ||
|
|
||
| namespace Aspire.Hosting.Kubernetes; | ||
| namespace Aspire.Hosting; |
There was a problem hiding this comment.
This namespace move changes the public API surface. The generated API baseline file (src/Aspire.Hosting.Kubernetes/api/Aspire.Hosting.Kubernetes.cs) should be regenerated/updated so it reflects KubernetesGatewayExtensions under the new Aspire.Hosting namespace (and doesn’t continue to omit these APIs), otherwise API review artifacts and baseline checks will be inaccurate.
|
Re-running the failed jobs in the CI workflow for this pull request because 4 jobs were identified as retry-safe transient failures in the CI run attempt.
Matched test failure patterns (2 tests)
|
|
The automated review flagged that the API baseline files should be updated for the namespace change. Per repo convention, API files (\�pi/*.cs) are auto-generated during the release process and are not updated during individual PRs. This is expected behavior during active development. |
|
/backport to release/13.3 |
|
Started backporting to |
|
/deployment-test |
|
🚀 Deployment tests starting on PR #16588... This will deploy to real Azure infrastructure. Results will be posted here when complete. |
|
❌ Deployment E2E Tests failed — 20 passed, 13 failed, 0 cancelled View test results and recordings
|
|
🎬 CLI E2E Test Recordings — 76 recordings uploaded (commit View all recordings
📹 Recordings uploaded automatically from CI run #25413803801 |
|
No documentation PR is required for this change. The existing [Kubernetes integration docs]((aspire.dev/redacted) don't cover the
|
Description
Move
KubernetesGatewayExtensionsandKubernetesIngressExtensionsfrom theAspire.Hosting.Kubernetesnamespace toAspire.Hosting.These extension methods (
AddGateway,AddIngress,WithRoute,WithTls,WithHostname, etc.) were in the wrong namespace, requiring users to add an explicitusing Aspire.Hosting.Kubernetes;directive. All other Kubernetes extension methods (AddKubernetesEnvironment,WithHelm, etc.) are already inAspire.Hosting, which is the convention for hosting extension methods across the repo.This is a source-breaking change for anyone who already has
using Aspire.Hosting.Kubernetes;— but since these APIs shipped in 13.3 preview and are marked experimental, the break is acceptable. Users who already have the using directive won't be affected (it's still valid, just no longer required).Checklist