Skip to content

Fix Kubernetes persistent volume ATS export names - #18979

Merged
Sébastien Ros (sebastienros) merged 2 commits into
mainfrom
sebros/fix-persistent-volume-exports
Aug 7, 2026
Merged

Fix Kubernetes persistent volume ATS export names#18979
Sébastien Ros (sebastienros) merged 2 commits into
mainfrom
sebros/fix-persistent-volume-exports

Conversation

@sebastienros

@sebastienros Sébastien Ros (sebastienros) commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Description

Parameterized Kubernetes persistent-volume configuration should be discoverable beside its literal counterpart in generated AppHost SDKs. This changes the ATS export names from withPvStorageClassParam and withPvCapacityParam to the parallel withStorageClassParam and withCapacityParam names.

KubernetesPersistentVolumeResource is now explicitly exported to ATS, matching the established pattern for Kubernetes Gateway, Ingress, NodePool, HelmChart, and cert-manager resources. The Kubernetes polyglot AppHosts exercise the resource-level API plus both literal and parameterized persistent-volume configuration in TypeScript, Python, Go, and Java.

User-facing usage

C# AppHost:

var storageClass = builder.AddParameter("persistent-volume-storage-class");
var capacity = builder.AddParameter("persistent-volume-capacity");

var volume = kubernetes.AddPersistentVolume("data")
    .WithStorageClass(storageClass)
    .WithCapacity(capacity);

TypeScript AppHost:

const volume = await kubernetes.addPersistentVolume('data');
await volume.withStorageClassParam(storageClass);
await volume.withCapacityParam(capacity);
const resourceName = await volume.getResourceName();

Validation included building Aspire.Hosting.Kubernetes, regenerating each affected polyglot SDK with the repository CLI, and compiling the TypeScript, Python, Go, and Java Kubernetes AppHosts.

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

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

Copilot-Session: 65c05591-5ad7-4d10-b6b4-40bf8337f17f
Copilot AI balanced review requested due to automatic review settings August 3, 2026 23:16
@github-actions

github-actions Bot commented Aug 3, 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 -- 18979

Or

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

@github-actions github-actions Bot added the area-integrations Issues pertaining to Aspire Integrations packages label Aug 3, 2026
@sebastienros
Sébastien Ros (sebastienros) marked this pull request as draft August 3, 2026 23:18
@github-actions

This comment has been minimized.

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

Corrects Kubernetes persistent-volume ATS export names and validates generated SDK discoverability across supported polyglot AppHosts.

Changes:

  • Renames parameterized storage-class and capacity exports.
  • Adds TypeScript, Python, Go, and Java compile coverage.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Aspire.Hosting.Kubernetes/KubernetesPersistentVolumeExtensions.cs Corrects ATS export names.
tests/PolyglotAppHosts/Aspire.Hosting.Kubernetes/TypeScript/apphost.mts Exercises both overload forms.
tests/PolyglotAppHosts/Aspire.Hosting.Kubernetes/Python/apphost.py Exercises both overload forms.
tests/PolyglotAppHosts/Aspire.Hosting.Kubernetes/Go/apphost.go Exercises both overload forms.
tests/PolyglotAppHosts/Aspire.Hosting.Kubernetes/Java/AppHost.java Exercises both overload forms.

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

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

Copilot-Session: 65c05591-5ad7-4d10-b6b4-40bf8337f17f
Copilot AI review requested due to automatic review settings August 6, 2026 23:43
@sebastienros
Sébastien Ros (sebastienros) marked this pull request as draft August 6, 2026 23:44

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

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Tests selector (audit mode)

The full test matrix and all jobs still run in audit mode. The tests and jobs below are what selective CI would run under enforcement.

3 / 100 test projects · 4 jobs, from 6 changed files.

Selected test projects (3 / 100)

Aspire.Hosting.Azure.Kubernetes.Tests, Aspire.Hosting.Docker.Tests, Aspire.Hosting.Kubernetes.Tests

Selected jobs (4)

deployment-e2e, extension-e2e, polyglot, typescript-api-compat


How these were chosen — grouped by what changed

🔧 src/Aspire.Hosting.Kubernetes/KubernetesPersistentVolumeExtensions.cs (changed source)
1 directly: Aspire.Hosting.Kubernetes.Tests
2 via the project graph: Aspire.Hosting.Azure.Kubernetes.Tests (2 hops), Aspire.Hosting.Docker.Tests

🔧 src/Aspire.Hosting.Kubernetes/KubernetesPersistentVolumeResource.cs (changed source)
1 directly: Aspire.Hosting.Kubernetes.Tests

Job reasons

Job Triggered by
deployment-e2e affected project Aspire.Hosting.Azure.Kubernetes
extension-e2e src/Aspire.Hosting.Kubernetes/KubernetesPersistentVolumeExtensions.cs, src/Aspire.Hosting.Kubernetes/KubernetesPersistentVolumeResource.cs
• affected project Aspire.Hosting.Kubernetes
polyglot tests/PolyglotAppHosts/Aspire.Hosting.Kubernetes/Go/apphost.go, tests/PolyglotAppHosts/Aspire.Hosting.Kubernetes/Java/AppHost.java, tests/PolyglotAppHosts/Aspire.Hosting.Kubernetes/Python/apphost.py, tests/PolyglotAppHosts/Aspire.Hosting.Kubernetes/TypeScript/apphost.mts
typescript-api-compat affected project Aspire.Hosting.Kubernetes

Selection computed for commit 0b097e6.

@sebastienros
Sébastien Ros (sebastienros) marked this pull request as ready for review August 7, 2026 16:23
@sebastienros
Sébastien Ros (sebastienros) merged commit e79efb1 into main Aug 7, 2026
342 checks passed
@sebastienros
Sébastien Ros (sebastienros) deleted the sebros/fix-persistent-volume-exports branch August 7, 2026 17:08
@github-actions github-actions Bot added this to the 13.5 milestone Aug 7, 2026
@aspire-repo-bot

Copy link
Copy Markdown
Contributor

Pull request created: #1450

Generated by PR Documentation Check · auto · 85.9 AIC · ⌖ 6.55 AIC · ⊞ 19.4K

@aspire-repo-bot

Copy link
Copy Markdown
Contributor

📝 Documentation has been drafted in microsoft/aspire.dev#1450 targeting release/13.5.

Updated the TypeScript configuration-methods table in persistent-volumes.mdx to rename withPvStorageClassParamwithStorageClassParam and withPvCapacityParamwithCapacityParam, matching the renamed ATS export names in the source PR.

Note

This draft PR needs human review before merging.

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

Labels

area-integrations Issues pertaining to Aspire Integrations packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants