Skip to content

Move Ingress and Gateway extensions to Aspire.Hosting namespace - #16588

Merged
Mitch Denny (mitchdenny) merged 1 commit into
mainfrom
fix/kubernetes-extensions-namespace
May 6, 2026
Merged

Move Ingress and Gateway extensions to Aspire.Hosting namespace#16588
Mitch Denny (mitchdenny) merged 1 commit into
mainfrom
fix/kubernetes-extensions-namespace

Conversation

@mitchdenny

Copy link
Copy Markdown
Member

Description

Move KubernetesGatewayExtensions and KubernetesIngressExtensions from the Aspire.Hosting.Kubernetes namespace to Aspire.Hosting.

These extension methods (AddGateway, AddIngress, WithRoute, WithTls, WithHostname, etc.) were in the wrong namespace, requiring users to add an explicit using Aspire.Hosting.Kubernetes; directive. All other Kubernetes extension methods (AddKubernetesEnvironment, WithHelm, etc.) are already in Aspire.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

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
    • No
  • Does the change require an update in our Aspire docs?
    • Yes
    • No

Copilot AI review requested due to automatic review settings April 30, 2026 05:20
@github-actions

github-actions Bot commented Apr 30, 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/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 16588

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 16588"

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

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 KubernetesIngressExtensions from Aspire.Hosting.Kubernetes to Aspire.Hosting.
  • Moved KubernetesGatewayExtensions from Aspire.Hosting.Kubernetes to Aspire.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.

Comment on lines 4 to +7
using Aspire.Hosting.ApplicationModel;
using Aspire.Hosting.Kubernetes;

namespace Aspire.Hosting.Kubernetes;
namespace Aspire.Hosting;

Copilot AI Apr 30, 2026

Copy link

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Comment on lines 4 to +7
using Aspire.Hosting.ApplicationModel;
using Aspire.Hosting.Kubernetes;

namespace Aspire.Hosting.Kubernetes;
namespace Aspire.Hosting;

Copilot AI Apr 30, 2026

Copy link

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
@github-actions

Copy link
Copy Markdown
Contributor

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.
GitHub was asked to rerun all failed jobs for that attempt, and the rerun is being tracked in the rerun attempt.
The job links below point to the failed attempt jobs that matched the retry-safe transient failure rules.

Matched test failure patterns (2 tests)
  • Aspire.Cli.EndToEnd.Tests.OtelLogsTests.OtelLogsReturnsStructuredLogsFromStarterAppIsolated — MCR registry rate limiting (HTTP 403)
  • Aspire.Cli.EndToEnd.Tests.OtelLogsTests.OtelLogsReturnsStructuredLogsFromStarterApp — MCR registry rate limiting (HTTP 403)

@mitchdenny

Copy link
Copy Markdown
Member Author

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.

@mitchdenny

Copy link
Copy Markdown
Member Author

/backport to release/13.3

@github-actions

github-actions Bot commented May 1, 2026

Copy link
Copy Markdown
Contributor

Started backporting to release/13.3 (link to workflow run)

@mitchdenny

Copy link
Copy Markdown
Member Author

/deployment-test

@github-actions

github-actions Bot commented May 1, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployment tests starting on PR #16588...

This will deploy to real Azure infrastructure. Results will be posted here when complete.

View workflow run

@github-actions
github-actions Bot had a problem deploying to deployment-testing May 1, 2026 01:01 Failure
@github-actions
github-actions Bot had a problem deploying to deployment-testing May 1, 2026 01:01 Failure
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 1, 2026 01:01 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 1, 2026 01:01 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 1, 2026 01:01 Inactive
@github-actions
github-actions Bot had a problem deploying to deployment-testing May 1, 2026 01:01 Failure
@github-actions
github-actions Bot had a problem deploying to deployment-testing May 1, 2026 01:01 Failure
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 1, 2026 01:01 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 1, 2026 01:01 Inactive
@github-actions
github-actions Bot had a problem deploying to deployment-testing May 1, 2026 01:01 Failure
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 1, 2026 01:01 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 1, 2026 01:01 Inactive
@github-actions
github-actions Bot had a problem deploying to deployment-testing May 1, 2026 01:01 Failure
@github-actions
github-actions Bot had a problem deploying to deployment-testing May 1, 2026 01:01 Failure
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 1, 2026 01:01 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 1, 2026 01:01 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 6, 2026 03:19 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 6, 2026 03:19 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 6, 2026 03:19 Inactive
@github-actions
github-actions Bot had a problem deploying to deployment-testing May 6, 2026 03:19 Failure
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 6, 2026 03:19 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 6, 2026 03:19 Inactive
@github-actions
github-actions Bot had a problem deploying to deployment-testing May 6, 2026 03:19 Failure
@github-actions
github-actions Bot had a problem deploying to deployment-testing May 6, 2026 03:19 Failure
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 6, 2026 03:19 Inactive
@github-actions
github-actions Bot had a problem deploying to deployment-testing May 6, 2026 03:19 Failure
@github-actions
github-actions Bot had a problem deploying to deployment-testing May 6, 2026 03:19 Failure
@github-actions
github-actions Bot had a problem deploying to deployment-testing May 6, 2026 03:19 Failure
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 6, 2026 03:19 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 6, 2026 03:19 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 6, 2026 03:19 Inactive
@github-actions
github-actions Bot had a problem deploying to deployment-testing May 6, 2026 03:19 Failure
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 6, 2026 03:19 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 6, 2026 03:19 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 6, 2026 03:19 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 6, 2026 03:19 Inactive
@github-actions
github-actions Bot had a problem deploying to deployment-testing May 6, 2026 03:19 Failure
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 6, 2026 03:19 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 6, 2026 03:19 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 6, 2026 03:19 Inactive
@github-actions
github-actions Bot had a problem deploying to deployment-testing May 6, 2026 03:19 Failure
@github-actions

github-actions Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor

Deployment E2E Tests failed — 20 passed, 13 failed, 0 cancelled

View test results and recordings

View workflow run

Test Result Recording
Deployment.EndToEnd-AcaCompactNamingDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureServiceBusDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureLogAnalyticsDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureContainerRegistryDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-TypeScriptExpressDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AksStarterWithRedisHelmDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AppServiceReactDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AuthenticationTests ✅ Passed
Deployment.EndToEnd-AksVnetInfraDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureEventHubsDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AksWithAzureResourcesDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AksVnetWithAzureResourcesDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AksMultipleNodePoolsDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-KubernetesGatewayTlsDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AcaExistingRegistryDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AksBlazorRedisDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AksStarterDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureAppConfigDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AcaStarterDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AcaDeploymentErrorOutputTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-TypeScriptVnetSqlServerInfraDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-VnetSqlServerConnectivityDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-VnetKeyVaultInfraDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-VnetSqlServerInfraDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-VnetKeyVaultConnectivityDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-AzureStorageDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-NspStorageKeyVaultDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-VnetStorageBlobConnectivityDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-AcaManagedRedisDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-FrontDoorDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-AzureKeyVaultDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-AcaCustomRegistryDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-VnetStorageBlobInfraDeploymentTests ❌ Failed ▶️ View Recording

@github-actions

github-actions Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor

🎬 CLI E2E Test Recordings — 76 recordings uploaded (commit 1c9ae82)

View all recordings
Status Test Recording
AddPackageInteractiveWhileAppHostRunningDetached ▶️ View Recording
AddPackageWhileAppHostRunningDetached ▶️ View Recording
AgentCommands_AllHelpOutputs_AreCorrect ▶️ View Recording
AgentInitCommand_DefaultSelection_InstallsSkillOnly ▶️ View Recording
AgentInitCommand_MigratesDeprecatedConfig ▶️ View Recording
AspireAddPackageVersionToDirectoryPackagesProps ▶️ View Recording
AspireUpdateRemovesAppHostPackageVersionFromDirectoryPackagesProps ▶️ View Recording
Banner_DisplayedOnFirstRun ▶️ View Recording
Banner_DisplayedWithExplicitFlag ▶️ View Recording
Banner_NotDisplayedWithNoLogoFlag ▶️ View Recording
CertificatesClean_RemovesCertificates ▶️ View Recording
CertificatesTrust_WithNoCert_CreatesAndTrustsCertificate ▶️ View Recording
CertificatesTrust_WithUntrustedCert_TrustsCertificate ▶️ View Recording
ConfigSetGet_CreatesNestedJsonFormat ▶️ View Recording
CreateAndRunAspireStarterProject ▶️ View Recording
CreateAndRunAspireStarterProjectWithBundle ▶️ View Recording
CreateAndRunEmptyAppHostProject ▶️ View Recording
CreateAndRunJavaEmptyAppHostProject ▶️ View Recording
CreateAndRunJsReactProject ▶️ View Recording
CreateAndRunPythonReactProject ▶️ View Recording
CreateAndRunTypeScriptEmptyAppHostProject ▶️ View Recording
CreateAndRunTypeScriptStarterProject ▶️ View Recording
CreateJavaAppHostWithViteApp ▶️ View Recording
CreateTypeScriptAppHostWithViteApp_UsesConfiguredToolchain ▶️ View Recording
DashboardRunWithOtelTracesReturnsNoTraces ▶️ View Recording
DeployK8sBasicApiService ▶️ View Recording
DeployK8sWithGarnet ▶️ View Recording
DeployK8sWithMongoDB ▶️ View Recording
DeployK8sWithMySql ▶️ View Recording
DeployK8sWithPostgres ▶️ View Recording
DeployK8sWithRabbitMQ ▶️ View Recording
DeployK8sWithRedis ▶️ View Recording
DeployK8sWithSqlServer ▶️ View Recording
DeployK8sWithValkey ▶️ View Recording
DeployTypeScriptAppToKubernetes ▶️ View Recording
DescribeCommandResolvesReplicaNames ▶️ View Recording
DescribeCommandShowsRunningResources ▶️ View Recording
DetachFormatJsonProducesValidJson ▶️ View Recording
DetachFormatJsonProducesValidJsonWhenRestartingExistingInstance ▶️ View Recording
DoListStepsShowsPipelineSteps ▶️ View Recording
DocsCommand_RendersInteractiveMarkdownFromLocalSource ▶️ View Recording
DoctorCommand_DetectsDeprecatedAgentConfig ▶️ View Recording
DoctorCommand_TypeScriptAppHostReportsMissingConfiguredToolchain ▶️ View Recording
DoctorCommand_WithSslCertDir_ShowsTrusted ▶️ View Recording
DoctorCommand_WithoutSslCertDir_ShowsPartiallyTrusted ▶️ View Recording
GlobalMigration_HandlesCommentsAndTrailingCommas ▶️ View Recording
GlobalMigration_HandlesMalformedLegacyJson ▶️ View Recording
GlobalMigration_PreservesAllValueTypes ▶️ View Recording
GlobalMigration_SkipsWhenNewConfigExists ▶️ View Recording
GlobalSettings_MigratedFromLegacyFormat ▶️ View Recording
InitTypeScriptAppHost_AugmentsExistingViteRepoAtRoot ▶️ View Recording
InteractiveCSharpInitCreatesExpectedFiles ▶️ View Recording
InvalidAppHostPathWithComments_IsHealedOnRun ▶️ View Recording
LatestCliCanStartStableChannelAppHost ▶️ View Recording
LatestCliCanStartStableChannelTypeScriptAppHost ▶️ View Recording
LegacySettingsMigration_AdjustsRelativeAppHostPath ▶️ View Recording
LogsCommandShowsResourceLogs ▶️ View Recording
OtelLogsReturnsStructuredLogsFromStarterAppCore ▶️ View Recording
PsCommandListsRunningAppHost ▶️ View Recording
PsFormatJsonOutputsOnlyJsonToStdout ▶️ View Recording
PublishWithConfigureEnvFileUpdatesEnvOutput ▶️ View Recording
PublishWithDockerComposeServiceCallbackSucceeds ▶️ View Recording
PublishWithoutOutputPathUsesAppHostDirectoryDefault ▶️ View Recording
RestoreGeneratesSdkFiles ▶️ View Recording
RestoreGeneratesSdkFiles_WithConfiguredToolchain ▶️ View Recording
RestoreRefreshesGeneratedSdkAfterAddingIntegration ▶️ View Recording
RestoreSupportsConfigOnlyHelperPackageAndCrossPackageTypes ▶️ View Recording
RunFromParentDirectory_UsesExistingConfigNearAppHost ▶️ View Recording
SecretCrudOnDotNetAppHost ▶️ View Recording
SecretCrudOnTypeScriptAppHost ▶️ View Recording
StagingChannel_ConfigureAndVerifySettings_ThenSwitchChannels ▶️ View Recording
StartAndWaitForTypeScriptSqlServerAppHostWithNativeAssets ▶️ View Recording
StopAllAppHostsFromAppHostDirectory ▶️ View Recording
StopNonInteractiveSingleAppHost ▶️ View Recording
StopWithNoRunningAppHostExitsSuccessfully ▶️ View Recording
UnAwaitedChainsCompileWithAutoResolvePromises ▶️ View Recording

📹 Recordings uploaded automatically from CI run #25413803801

@mitchdenny
Mitch Denny (mitchdenny) merged commit 8e6d9f5 into main May 6, 2026
589 of 609 checks passed
@aspire-repo-bot

Copy link
Copy Markdown
Contributor

No documentation PR is required for this change.

The existing [Kubernetes integration docs]((aspire.dev/redacted) don't cover the AddIngress, AddGateway, WithRoute, WithTls, or WithHostname extension methods that were moved to the Aspire.Hosting namespace. Since there's no existing documentation showing the old using Aspire.Hosting.Kubernetes; requirement for these APIs, there's no docs gap to address. The APIs are also marked experimental and shipped in a preview release, so migration guidance is not needed at this stage.

Generated by PR Documentation Check for issue #16588 · ● 476.5K ·

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants