Refine polyglot exports for Aspire.Hosting.Kubernetes#15003
Merged
davidfowl merged 8 commits intorelease/13.2from Mar 7, 2026
Merged
Refine polyglot exports for Aspire.Hosting.Kubernetes#15003davidfowl merged 8 commits intorelease/13.2from
davidfowl merged 8 commits intorelease/13.2from
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15003Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15003" |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR expands Aspire Type System (ATS) / polyglot export coverage for Aspire.Hosting.Kubernetes, enabling TypeScript (and other polyglot) AppHosts to call Kubernetes publishing APIs and access required resource properties in callback surfaces.
Changes:
- Added
[AspireExport]capabilities forPublishAsKubernetesService(...),AddKubernetesEnvironment(...), andWithProperties(...). - Exported
KubernetesResourceandKubernetesEnvironmentResourcewithExposeProperties = trueto support property access in callbacks. - Added a new TypeScript
ValidationAppHost(including generated.modulesSDK and project scaffolding files).
Reviewed changes
Copilot reviewed 12 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/Aspire.Hosting.Kubernetes/KubernetesServiceExtensions.cs | Exports publishAsKubernetesService capability for polyglot AppHosts. |
| src/Aspire.Hosting.Kubernetes/KubernetesResource.cs | Exposes KubernetesResource properties to ATS for callback scenarios. |
| src/Aspire.Hosting.Kubernetes/KubernetesEnvironmentResource.cs | Exposes environment properties to ATS (Helm chart/storage defaults). |
| src/Aspire.Hosting.Kubernetes/KubernetesEnvironmentExtensions.cs | Exports addKubernetesEnvironment and withProperties capabilities (and annotates resource name). |
| playground/polyglot/TypeScript/Aspire.Hosting.Kubernetes/ValidationAppHost/tsconfig.json | Adds TS compiler configuration for the validation AppHost. |
| playground/polyglot/TypeScript/Aspire.Hosting.Kubernetes/ValidationAppHost/package.json | Adds npm project manifest for the validation AppHost. |
| playground/polyglot/TypeScript/Aspire.Hosting.Kubernetes/ValidationAppHost/package-lock.json | Locks npm dependencies for reproducible validation builds. |
| playground/polyglot/TypeScript/Aspire.Hosting.Kubernetes/ValidationAppHost/apphost.ts | Validates new exports and property access via generated TypeScript SDK. |
| playground/polyglot/TypeScript/Aspire.Hosting.Kubernetes/ValidationAppHost/apphost.run.json | Adds run profile/environment variables for AppHost execution. |
| playground/polyglot/TypeScript/Aspire.Hosting.Kubernetes/ValidationAppHost/.modules/* | Adds generated TypeScript ATS transport/base/sdk outputs for validation. |
| playground/polyglot/TypeScript/Aspire.Hosting.Kubernetes/ValidationAppHost/.aspire/settings.json | Declares polyglot AppHost settings (language + package list). |
| playground/polyglot/TypeScript/Aspire.Hosting.Kubernetes/.aspire/settings.json | Adds an integration-root settings file (currently language-only). |
Files not reviewed (1)
- playground/polyglot/TypeScript/Aspire.Hosting.Kubernetes/ValidationAppHost/package-lock.json: Language not supported
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
🎬 CLI E2E Test RecordingsThe following terminal recordings are available for commit
📹 Recordings uploaded automatically from CI run #22774928021 |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
davidfowl
approved these changes
Mar 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Validation:
dotnet build src/Aspire.Hosting.Kubernetes/Aspire.Hosting.Kubernetes.csproj /p:SkipNativeBuild=truecd playground/polyglot/TypeScript/Aspire.Hosting.Kubernetes/ValidationAppHost && npm ci --no-fund --no-audit && npx tsc --noEmitFixes # (issue)
Checklist
elements on your triple slash comments?- Yes
- No