Skip to content

Rename Ingress WithRoute to WithPath; split Gateway path enum#17424

Merged
mitchdenny merged 3 commits into
mainfrom
mitchdenny/ingress-with-path-rename
May 24, 2026
Merged

Rename Ingress WithRoute to WithPath; split Gateway path enum#17424
mitchdenny merged 3 commits into
mainfrom
mitchdenny/ingress-with-path-rename

Conversation

@mitchdenny
Copy link
Copy Markdown
Member

Description

The Kubernetes Ingress builder used WithRoute(...), but the YAML it emits has no "route" noun — each call adds an entry to spec.rules[].http.paths[]. The Gateway API builder also used WithRoute(...), which is correct there (one call ≈ one HTTPRoute rule), but both builders shared IngressPathType so Gateway code silently translated Ingress Prefix into Gateway PathPrefix.

This PR makes the public API match the underlying spec for each integration:

  • Ingress: WithRouteWithPath (both overloads: path-only and host+path). Internal IngressRouteConfig / Routes become IngressPathConfig / Paths. ATS exports: withIngressPath + withIngressHostAndPath.
  • Gateway: Keeps WithRoute (correctly models HTTPRoute) but no longer borrows IngressPathType. New GatewayPathMatchType enum with Gateway API vocabulary (PathPrefix / Exact / RegularExpression), and the HTTPRoute mapping now passes the value through directly instead of translating from Ingress terminology.

Clean rename, no [Obsolete] shim. Doc comments, examples, the aspire-deployment skill reference, playground AppHosts, and tests were all updated to match. api/*.cs files are intentionally untouched per repo policy — they regenerate at release time.

All 295 affected tests pass (Aspire.Hosting.Kubernetes.Tests 233/233, Aspire.Hosting.Azure.Kubernetes.Tests 62/62).

Fixes # (issue)

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
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No

Aligns the Kubernetes Ingress builder API with the YAML it actually emits:
spec.rules[].http.paths[]. WithPath replaces WithRoute on
KubernetesIngressResource (overloads for path-only and host+path), and the
internal IngressRouteConfig / Routes collection become IngressPathConfig /
Paths. KubernetesGatewayResource keeps WithRoute, which correctly maps to
the HTTPRoute object the Gateway API spec models.

Also decouples the Gateway from IngressPathType by introducing
GatewayPathMatchType (PathPrefix / Exact / RegularExpression), matching the
Gateway API path match vocabulary. The Gateway HTTPRoute builder no longer
silently translates Ingress 'Prefix' into Gateway 'PathPrefix'.

ATS / AspireExport IDs:
- withIngressPathRoute -> withIngressPath
- withIngressHostRoute -> withIngressHostAndPath

This is a clean rename (no [Obsolete] shim). Docs, playground examples,
the aspire-deployment skill reference, and tests have all been updated.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 24, 2026 01:44
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 24, 2026

🚀 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 -- 17424

Or

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

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

Updates Aspire’s Kubernetes publishing APIs to better match the underlying Kubernetes specs by renaming the Ingress authoring surface from “route” to “path”, while keeping “route” semantics for Gateway API (HTTPRoute) and splitting the path match enums to avoid cross-spec vocabulary mismatches.

Changes:

  • Ingress: rename WithRoute(...)WithPath(...), and rename internal route config/storage to path-based naming.
  • Gateway: introduce GatewayPathMatchType (PathPrefix/Exact/RegularExpression) and stop reusing IngressPathType to avoid incorrect translations.
  • Update unit tests and deployment skill reference docs to reflect the new API names/terminology.
Show a summary per file
File Description
tests/Aspire.Hosting.Kubernetes.Tests/KubernetesIngressTests.cs Updates Ingress tests to use WithPath and renames several test cases accordingly.
tests/Aspire.Hosting.Azure.Kubernetes.Tests/AzureKubernetesIngressTests.cs Updates AKS Ingress tests to use WithPath.
src/Aspire.Hosting.Kubernetes/KubernetesIngressResource.cs Renames internal “routes” list/config to “paths” and updates docs/examples.
src/Aspire.Hosting.Kubernetes/KubernetesIngressExtensions.cs Renames Ingress builder API to WithPath and updates ATS export names.
src/Aspire.Hosting.Kubernetes/KubernetesGatewayResource.cs Adds GatewayPathMatchType enum and updates gateway route config to use it.
src/Aspire.Hosting.Kubernetes/KubernetesGatewayExtensions.cs Updates Gateway WithRoute overloads to accept GatewayPathMatchType.
src/Aspire.Hosting.Kubernetes/KubernetesEnvironmentResource.cs Updates Ingress processing to use Paths; updates Gateway HTTPRoute match type mapping.
src/Aspire.Hosting.Kubernetes/Extensions/EndpointRoutingValidation.cs Updates doc text to reflect WithPath vs WithRoute call sites.
src/Aspire.Hosting.Azure.Kubernetes/AzureKubernetesIngressExtensions.cs Updates docs/examples to use WithPath for Ingress.
.agents/skills/aspire-deployment/references/kubernetes.md Updates skill reference guidance to mention Ingress WithPath and Gateway WithRoute.

Copilot's findings

  • Files reviewed: 10/10 changed files
  • Comments generated: 3

Comment thread src/Aspire.Hosting.Kubernetes/KubernetesEnvironmentResource.cs Outdated
Comment thread tests/Aspire.Hosting.Kubernetes.Tests/KubernetesIngressTests.cs Outdated
Comment thread tests/Aspire.Hosting.Kubernetes.Tests/KubernetesIngressTests.cs Outdated
CI surfaced a string-literal AppHost in KubernetesPublishRequiresExternalEndpointTests
that still referenced .WithRoute(...) on an Ingress builder. The Gateway
sibling test correctly stays on .WithRoute(...).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mitchdenny
Copy link
Copy Markdown
Member Author

/deployment-test

@github-actions
Copy link
Copy Markdown
Contributor

🚀 Deployment tests starting on PR #17424...

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

View workflow run

@github-actions github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:52 Inactive
@github-actions github-actions Bot had a problem deploying to deployment-testing May 24, 2026 03:52 Failure
@github-actions github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:52 Inactive
@github-actions github-actions Bot had a problem deploying to deployment-testing May 24, 2026 03:52 Failure
@github-actions github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:52 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:52 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:52 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:52 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:52 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:52 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:52 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:52 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:52 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:52 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:52 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:52 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:52 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:52 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:52 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:52 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:52 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:52 Inactive
@github-actions github-actions Bot had a problem deploying to deployment-testing May 24, 2026 03:52 Failure
@github-actions github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:52 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:52 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:52 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:52 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:52 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:52 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:52 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:52 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:52 Inactive
@github-actions github-actions Bot had a problem deploying to deployment-testing May 24, 2026 03:52 Failure
@github-actions github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:52 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:52 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:52 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:52 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:52 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:52 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:52 Inactive
@github-actions
Copy link
Copy Markdown
Contributor

Deployment E2E Tests failed — 36 passed, 4 failed, 0 cancelled

View test results and recordings

View workflow run

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

- Use InvalidOperationException with descriptive message for unknown
  GatewayPathMatchType instead of ArgumentOutOfRangeException with a
  parameter name that doesn't exist on the method (fixes CA2208).
- Update stale 'route' terminology in Ingress test comments and method
  names to match the new WithPath surface.
- Replace mojibake (ΓÇö) with plain ASCII in a test comment.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

CLI E2E Tests unknown — 96 passed, 0 failed, 5 unknown (commit 34aa7a7)

View all recordings
Status Test Recording
AddPackageInteractiveWhileAppHostRunningDetached ▶️ View recording
AddPackageWhileAppHostRunningDetached ▶️ View recording
AgentCommands_AllHelpOutputs_AreCorrect ▶️ View recording
AgentInitCommand_DefaultSelection_InstallsDefaultSkills ▶️ View recording
AgentInitCommand_MigratesDeprecatedConfig ▶️ View recording
AgentMcpListStructuredLogsFromStarterAppCore ▶️ View recording
AllPublishMethodsBuildDockerImages ▶️ View recording
AspireAddPackageVersionToDirectoryPackagesProps ▶️ View recording
AspireInitSingleFileAppHostRunsViaDotnetRunAppHost ▶️ View recording
AspireInitWithExistingAppHostDirRecreatesMissingNuGetConfigAndPreservesFiles ▶️ View recording
AspireInitWithSolutionFileGeneratesAppHostThatBuildsAgainstChannelHive ▶️ View recording
AspireStartUpdatesStaleTypeScriptAppHostPath ▶️ View recording
AspireUpdateRemovesAppHostPackageVersionFromDirectoryPackagesProps ▶️ View recording
AspireUpdateRemovesOrphanAppHostPackageVersionWhenSdkAlreadyCurrent ▶️ 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
DashboardRunWithAgentMcpCore ▶️ View recording
DashboardRunWithOtelTracesReturnsNoTracesCore ▶️ View recording
DeployK8sBasicApiService ▶️ View recording
DeployK8sWithExternalHelmChart ▶️ 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
GeneratedAspireDevScript_StartsWatchMode_WithConfiguredToolchain ▶️ 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
JavaScriptHostingApisRunFromTypeScriptAppHost ▶️ View recording
LatestCliCanStartStableChannelAppHost ▶️ View recording
LatestCliCanStartStableChannelTypeScriptAppHost ▶️ View recording
LegacySettingsMigration_AdjustsRelativeAppHostPath ▶️ View recording
LogLevelTrace_ProducesTraceEntriesInCliLogFile ▶️ View recording
LogsCommandShowsResourceLogs ▶️ View recording
OtelLogsReturnsStructuredLogsFromStarterApp ▶️ View recording
OtelLogsReturnsStructuredLogsFromStarterAppIsolated ▶️ View recording
PsCommandListsRunningAppHost ▶️ View recording
PsFormatJsonOutputsOnlyJsonToStdout ▶️ View recording
PublishJavaScriptPatternsGeneratesExpectedDockerComposeArtifacts ▶️ View recording
PublishWithConfigureEnvFileUpdatesEnvOutput ▶️ View recording
PublishWithDockerComposeServiceCallbackSucceeds ▶️ View recording
PublishWithoutOutputPathUsesAppHostDirectoryDefault ▶️ View recording
ResourceCommand_FailedExecution_DisplaysAppHostLogPathAndLogContainsEntries ▶️ View recording
ResourceCommand_FailsWhenInteractionServiceIsRequired ▶️ View recording
ResourceCommand_SetAndDeleteParameterUpdatesDescribeOutput ▶️ View recording
RestoreGeneratesSdkFiles ▶️ View recording
RestoreGeneratesSdkFiles_WithConfiguredToolchain ▶️ View recording
RestoreRefreshesGeneratedSdkAfterAddingIntegration ▶️ View recording
RestoreSupportsConfigOnlyHelperPackageAndCrossPackageTypes ▶️ View recording
RunFromParentDirectory_UsesExistingConfigNearAppHost ▶️ View recording
RunPublishFailureScenarioAsync ▶️ View recording
RunReportsSyntaxErrorsForDotNetAppHost ▶️ View recording
RunReportsSyntaxErrorsForTypeScriptAppHost ▶️ View recording
SecretCrudOnDotNetAppHost ▶️ View recording
SecretCrudOnTypeScriptAppHost ▶️ View recording
StagingChannel_ConfigureAndVerifySettings_ThenSwitchChannels ▶️ View recording
StartAndWaitForTypeScriptSqlServerAppHostWithNativeAssets ▶️ View recording
StartReportsSyntaxErrorsForDotNetAppHost ▶️ View recording
StartReportsSyntaxErrorsForTypeScriptAppHost ▶️ View recording
StopAllAppHostsFromAppHostDirectory ▶️ View recording
StopJavaPolyglotAppHostUsingApphostDirectory ▶️ View recording
StopNonInteractiveSingleAppHost ▶️ View recording
StopTypeScriptPolyglotAppHostUsingApphostDirectory ▶️ View recording
StopWithNoRunningAppHostExitsSuccessfully ▶️ View recording
UnAwaitedChainsCompileWithAutoResolvePromises ▶️ View recording
UpdateProjectChannelToStable_TypeScript_PicksUpStablePackages ▶️ View recording

📹 Recordings uploaded automatically from CI run #26373573286

@mitchdenny mitchdenny merged commit cc58f06 into main May 24, 2026
311 checks passed
@github-actions github-actions Bot added this to the 13.4 milestone May 24, 2026
@aspire-repo-bot
Copy link
Copy Markdown
Contributor

✅ No documentation update needed.

⚠️ Docs update needed — automated PR creation failed due to an infrastructure issue.

Triggered signals: new_public_type (new GatewayPathMatchType enum in KubernetesGatewayResource.cs) and pr_body_has_deprecation_marker (PR body mentions "no [Obsolete] shim").

The Aspire 13.3 What's New page (src/frontend/src/content/docs/whats-new/aspire-13-3.mdx) has a C# Ingress code example using ingress.WithRoute(...) which now needs to be ingress.WithPath(...). The same update is needed in the Japanese translation (ja/whats-new/aspire-13-3.mdx). Target branch: release/13.4.

Please apply these two one-line changes manually to microsoft/aspire.dev on release/13.4.

mitchdenny added a commit that referenced this pull request May 25, 2026
…Path

- Resolve each ParameterResource individually when the outer expression
  raises MissingParameterValueException, so parameters with
  publishValueAsDefault still get inlined in mixed-parameter expressions
  (per JamesNK review feedback).
- Update new ingress tests to use WithPath after WithRoute was renamed
  on KubernetesIngressResource in #17424.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
mitchdenny added a commit that referenced this pull request May 25, 2026
)

* Fix WithIngressClass parameter resolution for Kubernetes publish

When an ingress (or gateway) resource referenced a ParameterResource via
WithIngressClass, WithHostname, WithTls, etc., the generated YAML rendered
the literal format string "{0}" for unresolved parameters instead of a
Helm template expression. This made the published Helm chart unusable
unless the parameter had a value at publish time.

ResolveExpressionAsync now substitutes unresolved parameters with Helm
template references (`{{ .Values.parameters.<resource>.<param> }}` or
the secrets variant) and registers them in CapturedHelmValues so:

- The deploy-time values override file gets the resolved value.
- The chart's values.yaml has a placeholder entry, preventing helm
  template from emitting <no value>.

Deploy-time pipeline callers (TLS bootstrap, gateway address discovery)
use a new static ResolveExpressionAtDeployTimeAsync that preserves the
prior fallback behavior, since those run after parameters are expected
to be resolved.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Address review feedback: propagate missing-parameter exceptions and use TryGetValue

- ResolveValueProviderAsync no longer swallows MissingParameterValueException
  for non-ParameterResource value providers. Silently substituting empty string
  would have produced invalid Kubernetes manifest fields (e.g., secretName: '')
  that fail opaquely at deploy time. Letting it propagate surfaces the
  unresolved-parameter problem during publish.
- EnsureCapturedHelmValuePlaceholders now uses TryGetValue on _helmValues so
  the guard is real instead of relying on the indexer throwing first.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Address PR feedback: inline resolvable params, rename WithRoute->WithPath

- Resolve each ParameterResource individually when the outer expression
  raises MissingParameterValueException, so parameters with
  publishValueAsDefault still get inlined in mixed-parameter expressions
  (per JamesNK review feedback).
- Update new ingress tests to use WithPath after WithRoute was renamed
  on KubernetesIngressResource in #17424.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Mitch Denny <midenn@orangecake.localdomain>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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