Skip to content

[release/13.5] Add AKS persistent volume support - #19264

Merged
Jose Perez Rodriguez (joperezr) merged 5 commits into
release/13.5from
backport/pr-19226-to-release/13.5
Aug 12, 2026
Merged

[release/13.5] Add AKS persistent volume support#19264
Jose Perez Rodriguez (joperezr) merged 5 commits into
release/13.5from
backport/pr-19226-to-release/13.5

Conversation

@aspire-repo-bot

@aspire-repo-bot aspire-repo-bot Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Backport of #19226 to release/13.5

/cc Mitch Denny (@mitchdenny)

Customer Impact

AKS users cannot declare persistent volumes through AddAzureKubernetesEnvironment; following the 13.5 Kubernetes persistent-volume guidance results in a compile-time API error and blocks persistent storage on AKS.

Testing

69 AKS hosting tests passed; the deployment test project built successfully; C# and TypeScript publish scenarios and cross-environment validation passed; and a live AKS E2E proved data persisted after pod replacement and redeployment.

Risk

Medium. This adds public AKS API surface, but the implementation is a localized forwarding layer over the existing Kubernetes persistent-volume support and has unit, polyglot, publish, and live AKS deployment coverage.

Regression?

No. This fills a missing AKS API surface rather than restoring previously supported behavior.

Expose the Kubernetes persistent volume API through Azure Kubernetes environments and document the managed disk default. Add unit, polyglot, and deployment coverage for persistence across redeployments.

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

Copilot-Session: 650be0fb-e3a4-44d8-81d1-1bf5ae2b5274
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 650be0fb-e3a4-44d8-81d1-1bf5ae2b5274
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 650be0fb-e3a4-44d8-81d1-1bf5ae2b5274
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 650be0fb-e3a4-44d8-81d1-1bf5ae2b5274
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 650be0fb-e3a4-44d8-81d1-1bf5ae2b5274
Copilot AI balanced review requested due to automatic review settings August 12, 2026 02:22
@github-actions

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 -- 19264

Or

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

@github-actions github-actions Bot added the area-integrations Issues pertaining to Aspire Integrations packages label Aug 12, 2026

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

Note

Copilot could not run the full agentic suite for this review because it was automatically requested on a bot-authored pull request. Request a review from Copilot under Reviewers to retry with the full agentic suite. Improved support for bot-authored pull requests is coming soon.

Adds AKS persistent volume support and coverage across SDKs, including documentation, unit tests/snapshots, and an Azure deployment E2E test to validate redeploy persistence.

Changes:

  • Add AddPersistentVolume extension for AzureKubernetesEnvironmentResource and document usage (C# + TypeScript).
  • Add unit test + verified YAML snapshot for generated PersistentVolumeClaim output.
  • Add deployment E2E test that verifies PVC data survives an app redeploy.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/PolyglotAppHosts/Aspire.Hosting/TypeScript/apphost.mts Adds an AKS persistent volume to the TS polyglot app host.
tests/PolyglotAppHosts/Aspire.Hosting/Java/AppHost.java Adds an AKS persistent volume to the Java polyglot app host.
tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesPersistentVolumeTests.AksAddPersistentVolume_GeneratesClaimUsingClusterDefaults.verified.yaml Adds snapshot for generated PVC YAML.
tests/Aspire.Hosting.Azure.Kubernetes.Tests/AzureKubernetesPersistentVolumeTests.cs Adds unit tests for AKS persistent volume parent + YAML generation.
tests/Aspire.Deployment.EndToEnd.Tests/AksPersistentVolumeDeploymentTests.cs Adds Azure deployment E2E test validating PVC survives redeploy.
src/Aspire.Hosting.Azure.Kubernetes/README.md Documents persistent volume creation and mounting in C# and TypeScript.
src/Aspire.Hosting.Azure.Kubernetes/AzureKubernetesPersistentVolumeExtensions.cs Introduces AddPersistentVolume extension on AKS environment builder.
src/Aspire.Hosting.Azure.Kubernetes/Aspire.Hosting.Azure.Kubernetes.csproj Enables Aspire integration analyzers for the package.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@@ -0,0 +1,11 @@
---
try
{
process.Start();
await process.WaitForExitAsync();
var deploymentRevision = app.Configuration["DEPLOYMENT_REVISION"]
?? throw new InvalidOperationException("DEPLOYMENT_REVISION is not configured.");

app.MapGet("/", async (string action) =>
@github-actions

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 7 changed files.

Selected test projects (3 / 100)

Aspire.Deployment.EndToEnd.Tests, Aspire.Hosting.Azure.Kubernetes.Tests, Aspire.Hosting.Azure.Tests

Selected jobs (4)

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


How these were chosen — grouped by what changed

🔧 src/Aspire.Hosting.Azure.Kubernetes/Aspire.Hosting.Azure.Kubernetes.csproj (changed source)
2 directly: Aspire.Hosting.Azure.Kubernetes.Tests, Aspire.Hosting.Azure.Tests

🔧 src/Aspire.Hosting.Azure.Kubernetes/AzureKubernetesPersistentVolumeExtensions.cs (changed source)
2 directly: Aspire.Hosting.Azure.Kubernetes.Tests, Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Deployment.EndToEnd.Tests/AksPersistentVolumeDeploymentTests.cs (changed test)
1 directly: Aspire.Deployment.EndToEnd.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/AzureKubernetesPersistentVolumeTests.cs (changed test)
1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesPersistentVolumeTests.AksAddPersistentVolume_GeneratesClaimUsingClusterDefaults.verified.yaml (changed test)
1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

Job reasons

Job Triggered by
deployment-e2e tests/Aspire.Deployment.EndToEnd.Tests/AksPersistentVolumeDeploymentTests.cs
• affected project Aspire.Hosting.Azure.Kubernetes
extension-e2e src/Aspire.Hosting.Azure.Kubernetes/Aspire.Hosting.Azure.Kubernetes.csproj, src/Aspire.Hosting.Azure.Kubernetes/AzureKubernetesPersistentVolumeExtensions.cs
• affected project Aspire.Hosting.Azure.Kubernetes
polyglot tests/PolyglotAppHosts/Aspire.Hosting/Java/AppHost.java, tests/PolyglotAppHosts/Aspire.Hosting/TypeScript/apphost.mts
typescript-api-compat affected project Aspire.Hosting.Azure.Kubernetes

Selection computed for commit 2217d9e.

@joperezr

Copy link
Copy Markdown
Member

Correctness check, low risk.

@joperezr
Jose Perez Rodriguez (joperezr) merged commit e382453 into release/13.5 Aug 12, 2026
349 checks passed
@joperezr
Jose Perez Rodriguez (joperezr) deleted the backport/pr-19226-to-release/13.5 branch August 12, 2026 21:39
@microsoft-github-policy-service microsoft-github-policy-service Bot added this to the 13.5 milestone Aug 12, 2026
@aspire-repo-bot

Copy link
Copy Markdown
Contributor Author

✅ No documentation update needed.

Step 5 branch taken: excluded → base_branch_is_release, head_branch_is_backport, title_release_prefix, body_backport_marker

signals.json sets excluded: true, which overrides recommendation ("docs_optional") per the workflow rules. This PR is a backport.

Exclusion reasons (from signals.json):

  • head_branch_is_backport — head branch is a backport branch
  • title_release_prefix — title is prefixed [release/13.5]
  • body_backport_marker — body contains "Backport of Add AKS persistent volume support #19226 to release/13.5"
  • base_branch_is_release — base branch is release/13.5 (supporting context only)

Triggered signals (3, not evaluated further since excluded overrides): experimental_attribute_added, integration_readme_changed, new_public_type.

The original (forward) PR #19226 on the default branch is the canonical source for documenting this AKS persistent volume feature; drafting a docs PR here would duplicate that effort. No docs PR created.

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 Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants